summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm7
-rw-r--r--doc/bugs/stray___60____47__p__62___tags.mdwn2
2 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 6739ba56c..0cbc84788 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1164,7 +1164,7 @@ sub htmlize ($$$$) {
my $content=shift;
my $oneline = $content !~ /\n/;
-
+
if (exists $hooks{htmlize}{$type}) {
$content=$hooks{htmlize}{$type}{call}->(
page => $page,
@@ -1185,10 +1185,9 @@ sub htmlize ($$$$) {
if ($oneline) {
# hack to get rid of enclosing junk added by markdown
- # and other htmlizers
+ # and other htmlizers/sanitizers
$content=~s/^<p>//i;
- $content=~s/<\/p>$//i;
- chomp $content;
+ $content=~s/<\/p>\n*$//i;
}
return $content;
diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn
index 6e508ffda..99d6fe09f 100644
--- a/doc/bugs/stray___60____47__p__62___tags.mdwn
+++ b/doc/bugs/stray___60____47__p__62___tags.mdwn
@@ -13,3 +13,5 @@ I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalanc
}
The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved.
+
+> [[done]] --[[Joey]]