diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-09-02 19:06:30 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-09-02 19:06:53 +0200 |
commit | f55d6ec9427814b330da3079acf5ccb301e2723e (patch) | |
tree | 19eff75cbfa89748db5d8562e14bb8af48ff9de1 | |
parent | 060d2db5fd344f4770dcd41d657b04ced0a6f363 (diff) |
always decode ICal::Data strings (apparently is raw bytes)
-rw-r--r-- | lib/Object/Groupware/Event.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Object/Groupware/Event.pm b/lib/Object/Groupware/Event.pm index 2ab3586..e877b50 100644 --- a/lib/Object/Groupware/Event.pm +++ b/lib/Object/Groupware/Event.pm @@ -20,9 +20,9 @@ field $span; field $start : reader = $entry->start; field $end : reader = $entry->end; -field $summary : reader = $entry->summary; -field $description : reader = $entry->description || ''; -field $location : reader = $entry->_simple_property('location'); +field $summary : reader = decode_utf8 $entry->summary; +field $description : reader = decode_utf8 $entry->description || ''; +field $location : reader = decode_utf8 $entry->_simple_property('location'); field $price : reader; field @attendees; field @attachments; @@ -50,14 +50,14 @@ ADJUST { if ( $entry->property('attendee') ) { for ( @{ $entry->property('attendee') } ) { - push @attendees, $_->parameters->{'CN'} - || $_->value =~ s/^mailto://r; + push @attendees, decode_utf8( $_->parameters->{'CN'} ) + || decode_utf8( $_->value =~ s/^mailto://r ); } } if ( $entry->property('attach') ) { for ( @{ $entry->property('attach') } ) { my $uri; - try { $uri = URI->new( $_->value ) } + try { $uri = URI->new( decode_utf8 $_->value ) } catch ($e) { $log->errorf( 'failed to parse URI %s: %s', $uri, $e ); next; |