From 31d01a8cf1ecaa3d4eec57d9e43b0e28ce0992ce Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 14 Apr 2011 17:42:12 +0000 Subject: [PATCH] Allow people to use ' entity (sinqle quote character: ') in wikitext. 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 | 1 + includes/Sanitizer.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 942e192d7f..4fb62c311c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 +* ' character entity is now allowed in wikitext === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index fa961cf974..401d50f179 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -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 ' 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, -- 2.20.1