summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-28 15:38:04 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-28 15:38:04 -0400
commitd5d56a24bd49142f8d387adce6c8ca5292af1874 (patch)
tree7664428f198679f409cb0cc1c58abd87fee42e69 /IkiWiki
parent67254135169cc57f4158f321b00964f250ca8d15 (diff)
When calling decode_utf8 on known-problimatic content in aggregate, explicitly pass 0 (FB_DEFAULT) as the second parameter. Apparently perl 5.8 needs this to avoid crashing on malformed utf-8, despite its docs saying it is the default.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/aggregate.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index a9c7447fa..e44c26f74 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -407,14 +407,14 @@ sub aggregate (@) { #{{{
# that contains invalid UTF-8 sequences. Convert
# feed to ascii to try to work around.
$feed->{message}.=" ".sprintf(gettext("(invalid UTF-8 stripped from feed)"));
- $content=Encode::decode_utf8($content);
+ $content=Encode::decode_utf8($content, 0);
$f=eval{XML::Feed->parse(\$content)};
}
if ($@) {
# Another possibility is badly escaped entities.
$feed->{message}.=" ".sprintf(gettext("(feed entities escaped)"));
$content=~s/\&(?!amp)(\w+);/&amp;$1;/g;
- $content=Encode::decode_utf8($content);
+ $content=Encode::decode_utf8($content, 0);
$f=eval{XML::Feed->parse(\$content)};
}
if ($@) {