fix bug that left stray </p> tags
Both markdown and tidy add paragraph tags around text, that needs to be stripped when the text is a short, one line fragment that is being inserted into a larger page. tidy also adds several newlines to the end, and this broke removal of the paragraph tags.master
parent
a01028ae81
commit
f8457f9a90
|
@ -1185,10 +1185,9 @@ sub htmlize ($$$$) {
|
||||||
|
|
||||||
if ($oneline) {
|
if ($oneline) {
|
||||||
# hack to get rid of enclosing junk added by markdown
|
# 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;
|
||||||
$content=~s/<\/p>$//i;
|
$content=~s/<\/p>\n*$//i;
|
||||||
chomp $content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
|
|
@ -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.
|
The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved.
|
||||||
|
|
||||||
|
> [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Reference in New Issue