Last modified: 2007-07-07 07:02:47 UTC
Recently, an AJAX based system of watching/unwatching pages has been implemented. It doesn't work for some pages on Farsi Wikipedia. An example is provided as a link.
This problem occurs in Firefox, and is because of the use of Zero Width Non Joiner character in the title of the page. CategoryTree extension had the same problem (see bug 9789) which I tried to fix, but left midway. As this new bug has a more widespread effect, I think either the AJAX code should be rewritten in a way that it can handle ZWNJ (u200C) character correctly on all browsers (e.g. by substituting it with another character) or this newly feature should be turned off until a newer version of Firefox is released with this bug resolved.
We should just fall back to normal watch when the UA is Firefox and ZWNJ is present, I guess (if it's even possible to check for ZWNJ . . .). Are you sure this only happens with Firefox? In particular, do you know if it happens with Mozilla, SeaMonkey, Camino, or other Gecko-based browsers? We might want to whitelist known working browsers rather than blacklist bad ones, because this is a pretty significant failure. Also, do you know what Mozilla bug number this corresponds to at bugzilla.mozilla.org, so that we can track when this is fixed upstream?
I'm not sure about the other Mozilla based browsers. But if you follow the link I provided in bug 9789, you will notice the versin of Gecko engine which is supposed to be error-free in this regard. I guess all current stable versions of Gecko based browsers are affected by this bug, but I'm not sure. What I'm sure is, neither IE nor Opera are affected.
Okay, the Mozilla bug is 274152:
Hmm, or maybe it's not? That seems to deal with string literals . . .
Works for me, Firefox 18.104.22.168 on Linux.
What's the problem?
The page actually goes on your watchlist, or you're just told it does? I get the success message but my watchlist remains empty (thus "silently fails").
Ahhhh -- so it *SAYS SUCCESS* but doesn't perform the task?
See, you should have said that. :)
Fixed in r23834, and that change posted live.
Just making sure those chars are encoded in the JS string literals seems to do the job.
Brion, this is just the same solution I found for bug 9789: to replace the characters. However, I only worked on ZWNJ and was not sure if ZWN (Zero Width Joiner) or any other character will result in a same problem or not. This is why I avoided to submit a patch for this bug (and bug 9789).
Well, you stood bolder than me, and yes, you've fixed it! Great job.