Allow people to use ' entity (sinqle quote character: ') in wikitext.
authorBrian Wolff <bawolff@users.mediawiki.org>
Thu, 14 Apr 2011 17:42:12 +0000 (17:42 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Thu, 14 Apr 2011 17:42:12 +0000 (17:42 +0000)
It probably wasn't included originally, as its not part of html4,
but was introduced in XML/XHTML1. Since we do all sorts of weird stuff
with ' characters (italic/bold) its probably good to allow lowly users to
have an easy to remember way of escaping it.

There's also a whole bunch of entities in html5 that we should maybe consider
decoding as well.

RELEASE-NOTES
includes/Sanitizer.php

index 942e192..4fb62c3 100644 (file)
@@ -236,6 +236,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo
 * (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for ca, kaa
 * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again
+* &apos; character entity is now allowed in wikitext
 
 === API changes in 1.18 ===
 * (bug 26339) Throw warning when truncating an overlarge API result
index fa961cf..401d50f 100644 (file)
@@ -45,6 +45,7 @@ class Sanitizer {
        /**
         * List of all named character entities defined in HTML 4.01
         * http://www.w3.org/TR/html4/sgml/entities.html
+        * As well as &apos; which is only defined starting in XHTML1.
         * @private
         */
        static $htmlEntities = array(
@@ -63,6 +64,7 @@ class Sanitizer {
                'amp'      => 38,
                'and'      => 8743,
                'ang'      => 8736,
+               'apos'     => 39,
                'Aring'    => 197,
                'aring'    => 229,
                'asymp'    => 8776,