X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/82182bb16eb28561a6c4ef22c9ad1e2f40b0ac3a..cc5be82b8b7cfe3b679d8ba4f0d62e0894d9f964:/IkiWiki/Plugin/git.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 3085a3b67..042c69f5a 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -139,6 +139,12 @@ sub safe_git (&@) { my @lines; while (<$OUT>) { chomp; + + # check for invalid utf-8, and toss it back to avoid crashes + if (! utf8::valid($_)) { + $_=encode_utf8($_); + } + push @lines, $_; }