]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/stray___60____47__p__62___tags.mdwn
split off todo item for multiple dependency types
[ikiwiki.git] / doc / bugs / stray___60____47__p__62___tags.mdwn
1 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]].
2
3 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).
4
5 I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalance:
6
7         if ($oneline) {
8                 # hack to get rid of enclosing junk added by markdown
9                 # and other htmlizers
10                 $content=~s/^<p>//i;
11                 $content=~s/<\/p>$//i;
12                 chomp $content;
13         }
14
15 The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved.