From 676409012b16f50de5222d70113381ff37e3fc46 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 7 Jul 2007 06:47:07 +0000 Subject: [PATCH] * (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak --- RELEASE-NOTES | 1 + includes/SpecialAllpages.php | 2 +- includes/Xml.php | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) 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 ); } -- 2.20.1