[thelist] Escaping quotes in a hidden input's value

Tab Alleman Tab.Alleman at MetroGuide.com
Thu Jun 3 12:32:08 CDT 2004


Joshua Olson wrote:

> Try switching the outside quotes to single quotes:
> 
> <input type="hidden" name="Title" value='"I Loved It!"'>

Ok, I knew I could do that, and should have said so in the first place,
but...

1)  Is this xHTML compliant?

2)  What if I want <input type="hidden" name="Title" value='"It's The
Bomb!"'>?  Then don't I have to escape the single-quote?  How would I do
that?

3)  I'd really rather not break my own coding convention of
property="value" if I can possibly avoid it.


More information about the thelist mailing list