rendered paste body44c44
< $doc->add_attr('@title' => $args->{entry}->title->utf8);
---
> $doc->add_attr('@title' => _test_utf8($args->{entry}->title));
46c46
< $doc->add_attr('@author' => $args->{entry}->author->utf8) if $args->{entry}->author;
---
> $doc->add_attr('@author' => _test_utf8($args->{entry}->author)) if $args->{entry}->author;
48,49c48,49
< $doc->add_text($args->{entry}->body->utf8);
< $doc->add_hidden_text($args->{entry}->title->utf8);
---
> $doc->add_text(_test_utf8($args->{entry}->body));
> $doc->add_hidden_text(_test_utf8($args->{entry}->title));
90a91,101
> sub _test_utf8 {
> my $str = shift;
> my $result;
> if (eval {$result = $str->utf8}) {
> return $result;
> }
> else {
> return $str;
> }
> }
>