diff --git a/t/markdown.t b/t/markdown.t index 1cd9ff0ec..dd980b84a 100644 --- a/t/markdown.t +++ b/t/markdown.t @@ -84,6 +84,15 @@ my $angle_link_dom = Mojo::DOM->new($angle_link); my $ahref = $angle_link_dom->at('a[href]'); is($ahref->attr('href'), 'https://searchfox.org/mozilla-central/rev/76fe4bb385348d3f45bbebcf69ba8c7283dfcec7/mobile/android/base/java/org/mozilla/gecko/toolbar/SecurityModeUtil.java#101', 'angle links are parsed properly'); -is($parser->render_html(''), "

<foo>

\n", "literal tags work"); +# Test that literal tags are not parsed as HTML, but are instead escaped. +# Need to use a tag that is not likely to get used in a real use case, +# because the bug_format_comment extension hook is allowed to arbitrarily +# modify the comment text, and we don't want to accidentally break a real +# use case where the tag contents might get modified and break our test. +is( + $parser->render_html(''), + "

<markdownliteraltesttoken>

\n", + 'literal tags work' +); done_testing;