Alt Text vs Apostrophe

Think you've found a bug? Here's the place to talk about it. It might actually get fixed.

Moderator: Public Forum Moderators


Topic author
Maeglin
Forum Noob
Posts: 8
Joined: Mon Dec 07, 2009 1:39 pm

Alt Text vs Apostrophe

Unread post by Maeglin » Wed Dec 23, 2009 4:13 am

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.


Topic author
Maeglin
Forum Noob
Posts: 8
Joined: Mon Dec 07, 2009 1:39 pm

Re: Alt Text vs Apostrophe

Unread post by Maeglin » Wed Dec 23, 2009 4:23 am

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

User avatar

commandermack
Chat Moderator
Posts: 1024
Joined: Thu Mar 19, 2009 5:40 pm

Re: Alt Text vs Apostrophe

Unread post by commandermack » Wed Dec 23, 2009 10:34 am

woo for more IE lameness. :P

User avatar

Gobberwart
Developer
Posts: 3396
Joined: Wed Jun 20, 2007 12:41 am
Location: Melbourne, Australia
Contact:

Re: Alt Text vs Apostrophe

Unread post by Gobberwart » Wed Dec 23, 2009 2:07 pm

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.
Image

User avatar

jimmyBUFFET
Forum Addict
Posts: 285
Joined: Tue Jan 06, 2009 10:10 pm
Location: Brackney, PA
Contact:

Re: Alt Text vs Apostrophe

Unread post by jimmyBUFFET » Thu Dec 24, 2009 2:38 am

Gobb is like a nerd superhero. FREELZ.

-jB
Image

Post Reply