On Commons the widely-used Template:Information contains code for machine-readibility. It takes the parameters and puts them in urlencoded form to the title attribute of a hidden <span>, so scripts can easily read them (at least I guess that's what it's for, the "machine-readibility code" is not documented well).
Now the parameters of Template:Information can get quite long. It seems that if the urlencoded string is longer than 33,xxx characters, it breaks. See for example http://commons.wikimedia.org/w/index.php?title=File:World_homosexuality_laws.svg&oldid=19428970 (at the bottom of the description).
The problem is not in the template or in the source of that specific file. It happens to all very long attributes. The whole <span> is corrupted in the HTML source code. I guess, the problem is in the parser or in tidy. Does anybody know, what's the exact reason and how to fix it?
Marcus Buck User:Slomox
Marcus Buck wrote:
Now the parameters of Template:Information can get quite long. It seems that if the urlencoded string is longer than 33,xxx characters, it breaks. See for example http://commons.wikimedia.org/w/index.php?title=File:World_homosexuality_laws.svg&oldid=19428970 (at the bottom of the description).
The problem is not in the template or in the source of that specific file. It happens to all very long attributes. The whole <span> is corrupted in the HTML source code. I guess, the problem is in the parser or in tidy. Does anybody know, what's the exact reason and how to fix it?
Marcus Buck User:Slomox
You should open a bug. Another, cleaner testcase http://commons.wikimedia.org/w/index.php?title=Commons:Sandbox&oldid=194... (working with just a character less on the title attribute )
On Sat, Mar 21, 2009 at 3:01 PM, Marcus Buck wiki@marcusbuck.org wrote:
On Commons the widely-used Template:Information contains code for machine-readibility. It takes the parameters and puts them in urlencoded form to the title attribute of a hidden <span>, so scripts can easily read them (at least I guess that's what it's for, the "machine-readibility code" is not documented well).
Does anybody actually use this code? Magnus perhaps? Else it could be safely removed I guess.
Bryan
wikitech-l@lists.wikimedia.org