Test (escaped) HTML entities in text content and attributes
authorGabriel Wicke <gwicke@wikimedia.org>
Mon, 14 Jan 2013 23:15:52 +0000 (15:15 -0800)
committerGabriel Wicke <gwicke@wikimedia.org>
Mon, 14 Jan 2013 23:15:52 +0000 (15:15 -0800)
Change-Id: Id4414ff177c7eb08dc43ccfa97993895b93710ca

tests/parser/parserTests.txt

index 5640113..c68f7d7 100644 (file)
@@ -7787,6 +7787,15 @@ I always thought &eacute; was a cute letter.
 </p>
 !! end
 
+!! test
+text with entity-escaped character entity-like string: eacute
+!! input
+I always thought &amp;eacute; was a cute letter.
+!! result
+<p>I always thought &amp;eacute; was a cute letter.
+</p>
+!! end
+
 !! test
 text with undefined character entity: xacute
 !! input
@@ -13387,6 +13396,23 @@ disabled
 </p>
 !! end
 
+!! test
+HTML tag with necessary entities in attributes
+!! input
+<span title="&amp;amp;">foo</span>
+!! result
+<p><span title="&amp;amp;">foo</span>
+</p>
+!! end
+
+!! test
+HTML tag with 'unnecessary' entity encoding in attributes
+!! input
+<span title="&amp;">foo</span>
+!! result
+<p><span title="&amp;">foo</span>
+</p>
+!! end
 
 TODO:
 more images