Add parser tests for decoding of entities in IDs and fragments
authorFomafix <fomafix@googlemail.com>
Thu, 29 Jun 2017 10:06:56 +0000 (12:06 +0200)
committerFomafix <fomafix@googlemail.com>
Tue, 25 Jul 2017 07:14:21 +0000 (09:14 +0200)
This change adds parser tests that test the current behavior of decoding
HTML entities in headings and links for IDs and fragments of links as
described in T103714.

With I88e8e2077e the tests get changed to the new behavior.

Change-Id: Ia79af95e53114c1154dd52769f2ad1ab673fdd9e

tests/parser/parserTests.txt

index e8ccd9d..29f42b3 100644 (file)
@@ -28364,3 +28364,14 @@ wgRawHtml=1
 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
 </div>
 !! end
+
+!! test
+Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
+!! wikitext
+== A&B&amp;C&amp;amp;D&amp;amp;amp;E ==
+[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]
+!! html/php
+<h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#A.26B.26C.26D.26amp.3BE">#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</a>
+</p>
+!! end