aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://smcv.pseudorandom.co.uk/ <http://smcv.pseudorandom.co.uk/@web>2008-11-22 13:38:02 -0500
committerJoey Hess <joey@kitenet.net>2008-11-22 13:38:02 -0500
commit61415acfb84480d4fe4f0952b559deabe12883c6 (patch)
tree205505720e66b13511e89a38b747596642a4d55d
parent37648a4c098b848294115128315600a57b8a834a (diff)
downloadikiwiki-61415acfb84480d4fe4f0952b559deabe12883c6.tar
ikiwiki-61415acfb84480d4fe4f0952b559deabe12883c6.tar.gz
Unbalanced </p> appears in some situations, particularly with htmltidy
-rw-r--r--doc/bugs/stray___60____47__p__62___tags.mdwn15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn
new file mode 100644
index 000000000..6e508ffda
--- /dev/null
+++ b/doc/bugs/stray___60____47__p__62___tags.mdwn
@@ -0,0 +1,15 @@
+When using the [[plugins/htmltidy]] plugin (and possibly in other circumstances), ikiwiki sometimes creates more `</p>` tags than `<p>` tags, causing unbalanced markup. I've previously noticed unbalanced tags when a `\[[!map]]` matches no pages. This is part of the reason I developed [[plugins/htmlbalance]].
+
+This is particularly noticeable if htmltidy is enabled when building the docwiki: on the 'contrib' plugin pages, the title becomes `foo </p> (third-party plugin)` (with the angle-brackets escaped - it seems the text gets sanitized but is then escaped anyway).
+
+I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalance:
+
+ if ($oneline) {
+ # hack to get rid of enclosing junk added by markdown
+ # and other htmlizers
+ $content=~s/^<p>//i;
+ $content=~s/<\/p>$//i;
+ chomp $content;
+ }
+
+The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved.