From: Brion Vibber Date: Sat, 7 Jul 2007 06:47:07 +0000 (+0000) Subject: * (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak X-Git-Tag: 1.31.0-rc.0~52215 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=676409012b16f50de5222d70113381ff37e3fc46;p=lhc%2Fweb%2Fwiklou.git * (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5e1139e252..79fdf3f032 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -261,6 +261,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN This corrects some odd behavior with sidebar items and custom namespaces containing ampersands. * (bug 10375) Change thousands separator character to   for Latin (la) +* (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak == API changes since 1.10 == diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index a079759089..8599cbf9dc 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -377,4 +377,4 @@ function getNamespaceKeyAndText ($ns, $text) { } } - +?> diff --git a/includes/Xml.php b/includes/Xml.php index 97c889886f..01ffb204d5 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -346,6 +346,13 @@ class Xml { # To avoid any complaints about bad entity refs "&" => "\\x26", + + # Work around https://bugzilla.mozilla.org/show_bug.cgi?id=274152 + # Encode certain Unicode formatting chars so affected + # versions of Gecko don't misinterpret our strings; + # this is a common problem with Farsi text. + "\xe2\x80\x8c" => "\\u200c", // ZERO WIDTH NON-JOINER + "\xe2\x80\x8D" => "\\u200D", // ZERO WIDTH JOINER ); return strtr( $string, $pairs ); }