]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1519157 - Fix linkification in h1-h6 for markdown comments
authorIsrael Madueme <purelogiq@gmail.com>
Fri, 11 Jan 2019 02:15:42 +0000 (21:15 -0500)
committerDylan William Hardison <dylan@hardison.net>
Fri, 11 Jan 2019 02:15:42 +0000 (21:15 -0500)
Bugzilla/Markdown.pm

index 8f38788a5a11e99844a6859b8284a7b848270215..8e3c85f55e32e2f29d8127aaa75a22893c1c6154 100644 (file)
@@ -49,7 +49,7 @@ sub render_html {
   # Replace < with \x{FDD4}, and remove \x{FDD4}.
   $markdown =~ tr/\x{FDD4}//d;
   $markdown =~ s{<(?!https?://)}{\x{FDD4}}gs;
-  my @valid_text_parent_tags = ('p', 'li', 'td');
+  my @valid_text_parent_tags = ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'li', 'td');
   my @bad_tags               = qw( img );
   my $bugzilla_shorthand     = $self->bugzilla_shorthand;
   my $html                   = decode('UTF-8', $parser->render_html($markdown));