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.
my $content=shift;
my $oneline = $content !~ /\n/;
my $content=shift;
my $oneline = $content !~ /\n/;
if (exists $hooks{htmlize}{$type}) {
$content=$hooks{htmlize}{$type}{call}->(
page => $page,
if (exists $hooks{htmlize}{$type}) {
$content=$hooks{htmlize}{$type}{call}->(
page => $page,
if ($oneline) {
# hack to get rid of enclosing junk added by markdown
if ($oneline) {
# hack to get rid of enclosing junk added by markdown
+ # and other htmlizers/sanitizers
- $content=~s/<\/p>$//i;
- chomp $content;
+ $content=~s/<\/p>\n*$//i;
}
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.