escaping " with "

Post here if your topic is about CSE HTML Validator but doesn't fit in another forum.

escaping " with "

Postby roedygr » Fri Mar 01, 2013 11:18 am

I was under the impression:

When you need to specify a " in the middle of text, you use the " entity to represent the character.

When you need to specify a " in the middle of a quoted attribute value, you have two ways of handling it:
<param name="say" value="He said &quot;All your base are belong to us&quot;">
<param name="say" value='He said "All your base are belong to us"'>

Yet I notice HTMLValidator does not complain about " in text. It is ok now? Was it always ok?
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: escaping " with &quot;

Postby Albert Wiersch » Fri Mar 01, 2013 11:43 am

roedygr wrote:When you need to specify a " in the middle of text, you use the &quot; entity to represent the character.


Actually, it is not necessary to use the character reference. I believe it was always technically OK... at least as far back as I can remember. :D

There is a still a 'legacy' option to make CSE HTML Validator complain about a direct double quote in text, should you want to enable it.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2433
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to Other CSE HTML Validator

Who is online

Users browsing this forum: No registered users and 1 guest