Page 1 of 1

Alt Text vs Apostrophe

Posted: Wed Dec 23, 2009 4:13 am
by Maeglin
Not that anyone ever uses or cares about alt text, but there seems to be a little problem in a few of them.

Specifically the ones which have an apostrophe.

Examples:
miner's helmet
ant's pants
Ant Queen's claw
grandfather's socks

Well, they aren't displaying right. My guess is when the code is read, it read the accursed apostrophe as being the end of the quotation. Ergo they display as:

miner
ant
Ant Queen
grandfather

As much fun as it might be wielding my grandfather as a weapon while wearing an ant on my legs and a miner on my head, I don't think that it was intended. I don't think this should be in the typo section since it is kinda a global issue, not just a "I hit t instead of r making shirt read as... well... y'know." Just a little code bug.

Re: Alt Text vs Apostrophe

Posted: Wed Dec 23, 2009 4:23 am
by Maeglin
This just in! Another reliable source seems to have no problems with this. But in an outdated version of Internet Explorer, it doesn't work! xD

Re: Alt Text vs Apostrophe

Posted: Wed Dec 23, 2009 10:34 am
by commandermack
woo for more IE lameness. :P

Re: Alt Text vs Apostrophe

Posted: Wed Dec 23, 2009 2:07 pm
by Gobberwart
Ahhh good old IE6 comes back to bite me in the ass yet again. Here's the scoop: IE6 (and below) doesn't support transparent PNG images. To work around this, I added some special javascript code, obtained elsewhere, that goes through all png images as they load and makes them transparent as they are in real browsers. As it turns out, this code doesn't handle single quotes in alt/title text at all and just chops it off.

Anyway, I've added another 60 lines or so of javascript, just for IE6, that counteracts this and fixes the alt tags. I've just uploaded the fix - you'll probably need to refresh your browser to get the latest code.

Re: Alt Text vs Apostrophe

Posted: Thu Dec 24, 2009 2:38 am
by jimmyBUFFET
Gobb is like a nerd superhero. FREELZ.

-jB