]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/relativedate.pm
update
[git.ikiwiki.info.git] / IkiWiki / Plugin / relativedate.pm
index 3e33cd5c358d42c56348bbaafa64daea6d8bb2c7..7f006af839e7cf1eb50002c73262e7aac3234291 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 no warnings 'redefine';
 use strict;
 use IkiWiki 3.00;
-use POSIX;
+use POSIX ();
 use Encode;
 
 sub import {
@@ -26,7 +26,7 @@ sub getsetup () {
 sub format (@) {
         my %params=@_;
 
-       if (! ($params{content}=~s!^(<body>)!$1.include_javascript($params{page})!em)) {
+       if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
                # no </body> tag, probably in preview mode
                $params{content}=include_javascript($params{page}, 1).$params{content};
        }