aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/relativedate.pm2
-rw-r--r--IkiWiki/Plugin/toggle.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
index 3e33cd5c3..06df2efd5 100644
--- a/IkiWiki/Plugin/relativedate.pm
+++ b/IkiWiki/Plugin/relativedate.pm
@@ -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};
}
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index aae8cdf84..ef066a42f 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -68,7 +68,7 @@ sub format (@) {
if ($params{content}=~s!(<div class="toggleable(?:-open)?" id="[^"]+">\s*)</div>!$1!g) {
$params{content}=~s/<div class="toggleableend">//g;
- 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};
}