Skip to content

Commit a86bbc5

Browse files
committed
added extension test that verifies that footnote labels get href escaped.
1 parent d43ae4b commit a86bbc5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/extensions.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,23 @@ This footnote is referenced[^a-footnote] multiple times, in lots of different pl
722722
</section>
723723
````````````````````````````````
724724

725+
## Footnote reference labels are href escaped
726+
727+
```````````````````````````````` example
728+
Hello[^"><script>alert(1)</script>]
729+
730+
[^"><script>alert(1)</script>]: pwned
731+
.
732+
<p>Hello<sup class="footnote-ref"><a href="#fn:%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref:%22%3E%3Cscript%3Ealert(1)%3C/script%3E">1</a></sup></p>
733+
<section class="footnotes">
734+
<ol>
735+
<li id="fn:%22%3E%3Cscript%3Ealert(1)%3C/script%3E">
736+
<p>pwned <a href="#fnref:%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref">↩</a></p>
737+
</li>
738+
</ol>
739+
</section>
740+
````````````````````````````````
741+
725742
## Interop
726743

727744
Autolink and strikethrough.

0 commit comments

Comments
 (0)