Last modified: 2012-06-23 08:46:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31794, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29794 - Weird problem with some characters on [[MediaWiki:Gadgets-definition‎]]
Weird problem with some characters on [[MediaWiki:Gadgets-definition‎]]
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Gadgets (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Max Semenik
:
Depends on:
Blocks: 35126
  Show dependency treegraph
 
Reported: 2011-07-09 22:20 UTC by Helder
Modified: 2012-06-23 08:46 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Big annoying bug with Gadgets extension (120.92 KB, image/png)
2011-07-09 22:20 UTC, Helder
Details

Description Helder 2011-07-09 22:20:16 UTC
Created attachment 8764 [details]
Big annoying bug with Gadgets extension

The problem I've mentioned on bug 28215 comment 7 reappeared, and this time I was able to find some way to reproduce it!

I've created a simple [[MediaWiki:Gadget-A.js]] with
----------------
var test = 'ok';
----------------

and then added it to [[MediaWiki:Gadgets-definition‎]] with "something" like this:
----------------
*A‎‎|A.js‎‎
----------------

and then nothing was displayed on [[Special:Gadgets]]. I didn't know why it didn't show up, so I've made some tests...

At some point I decided to type the "same" text again and it suddenly started to work, which I found very weird, because the diff was showing two pages with apparently the same content. Since the diffs ignore spaces and some other characteres, I decided to check exactly which characteres were in the editbox in the version of the page which didn't load the gadget. To do that, I wrote the following in the console of my browser:
---------------------------------
var str = $('#wpTextbox1').val();
for (i=0;i<str.length;i++){
   console.debug( "'"
       + str.charAt(i) + "'\t'"
       + str.charCodeAt(i) + "'"
   );
}
---------------------------------
You can check the result in the attached image.
So, indeed there was some invisible character between A and |, whose char code is 8206 (what is that? how did that ended up in the page?).

So, it would be really really cool if the code of the extension could check of such strange characters in the [[MediaWiki:Gadgets-definition]] page, and either filter them out or display some warning, so that people don't need to fight against such an odd bug again.

For the record, here is the log of the first round of the fight:
https://secure.wikimedia.org/wikibooks/pt/w/index.php?title=MediaWiki:Gadgets-definition&offset=20110301000000&limit=21&action=history
(spoiler: the bug wins! =)
Comment 1 Niklas Laxström 2011-07-09 22:25:05 UTC
It's U+200E LEFT-TO-RIGHT MARK. Very annoying little beasts that mystically appear near pipe symbols.
Comment 2 Max Semenik 2011-07-10 05:44:59 UTC
Hmm, could be done. Direction marks, non-breakable space, anything else worth ignoring?
Comment 3 Krinkle 2012-06-23 08:46:14 UTC
Marking wontfix. Patches are welcome, but this definition method is removed in the 2.0 branch, naturally making it impossible for these kind of issues to occur.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links