Geek Speak — HabitableZone

Geek Speak » in reply to re: Using quote marks in the href tag?

Single vs. double quotes

I wrote a filter that aggressively scrubs the HTML to eliminate dangerous or suspect code, such as script and event handlers and the like. It takes apart each tag and examines all the arguments inside of it, and it keys on double quotes to find the data to each arg. Although the standard allows single quotes, I didn't judge it worth the time to write the extra complexity to sense which type of quote is used. The filter also eliminates unquoted argument data, since it's non-standard and harder to judge whether something tricky is being attempted.

You used single quotes in that A tag, which is why it was nuked. Here's the tag using double quotes, and it should work just fine: Daily Show

Log in or register to post.

The whole thread (16 posts)