* (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 7 Jul 2007 06:47:07 +0000 (06:47 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 7 Jul 2007 06:47:07 +0000 (06:47 +0000)
RELEASE-NOTES
includes/SpecialAllpages.php
includes/Xml.php

index 5e1139e..79fdf3f 100644 (file)
@@ -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 &nbsp; for Latin (la)
+* (bug 10477) Fix AJAX watch for Farsi on Firefox: JavaScript encoding tweak
 
 
 == API changes since 1.10 ==
index a079759..8599cbf 100644 (file)
@@ -377,4 +377,4 @@ function getNamespaceKeyAndText ($ns, $text) {
 }
 }
 
-
+?>
index 97c8898..01ffb20 100644 (file)
@@ -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 );
        }