http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89681

Revision: 89681
Author:   brion
Date:     2011-06-07 20:11:24 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Followup to r86061: add parser test case to confirm that '&apos' in wikitext 
doesn't make it to output.

''' is not defined in HTML 4, and some browsers (for instance IE at least 
through 8) do not support it.
It is however part of XML 1 (and thus XHTML 1), and is also defined in HTML 5 
provisional, so it's fine to accept it.

Normalization seems to already handle turning the ' named char reference 
into ' so we don't have any compatibility worries.

Also added a comment on the def in Sanitizer that it shouldn't be used in 
output.

Modified Paths:
--------------
    trunk/phase3/includes/Sanitizer.php
    trunk/phase3/tests/parser/parserTests.txt

Modified: trunk/phase3/includes/Sanitizer.php
===================================================================
--- trunk/phase3/includes/Sanitizer.php 2011-06-07 19:58:10 UTC (rev 89680)
+++ trunk/phase3/includes/Sanitizer.php 2011-06-07 20:11:24 UTC (rev 89681)
@@ -64,7 +64,7 @@
                'amp'      => 38,
                'and'      => 8743,
                'ang'      => 8736,
-               'apos'     => 39,
+               'apos'     => 39, // New in XHTML & HTML 5; avoid in output for 
compatibility with IE.
                'Aring'    => 197,
                'aring'    => 229,
                'asymp'    => 8776,

Modified: trunk/phase3/tests/parser/parserTests.txt
===================================================================
--- trunk/phase3/tests/parser/parserTests.txt   2011-06-07 19:58:10 UTC (rev 
89680)
+++ trunk/phase3/tests/parser/parserTests.txt   2011-06-07 20:11:24 UTC (rev 
89681)
@@ -9212,6 +9212,16 @@
 !! end
 
 
+!! test
+Confirm that 'apos' named character reference doesn't make it to output (not 
legal in HTML 4)
+!! input
+Text's been normalized?
+!! result
+<p>Text&#39;s been normalized?
+</p>
+!! end
+
+
 TODO:
 more images
 more tables


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to