]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
make checkcontent compatible with hooks that need the full content
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index f826f9503805a55da1548a1f1d124315ee0ddb06..0a970284cdc41fbc831f4cd809d34f41dbc63b43 100644 (file)
@@ -10,6 +10,16 @@ use warnings;
 use strict;
 use IkiWiki 3.00;
 use Encode;
+BEGIN {
+       eval 'use Locale::Po4a::Common qw(nowrapi18n)';
+       if ($@) {
+               warning(sprintf(gettext('%s is too old, can not disable %s; '.
+                                       'a denial of service can thus be '.
+                                       'triggered by malicious content'),
+                               'Locale::Po4a', 'Text::WrapI18N'));
+               eval 'use Locale::Po4a::Common';
+       }
+}
 use Locale::Po4a::Chooser;
 use Locale::Po4a::Po;
 use File::Basename;