Log in

View Full Version : Input Value Escape "



bluewalrus
08-20-2010, 06:50 PM
How do I escape a double quote in html?

I want to use it like this


<input type="text" value="John said "Hello, there"?" />


I've tried


<input type="text" value="John said \"Hello, there\"?" />


and



<input type="text" value="John said 'Hello, there'?" />

bluewalrus
08-20-2010, 07:50 PM
Actually, the single quotes do work but I'd prefer to use double quotes if possible.

traq
08-20-2010, 08:19 PM
&quot; (http://w3schools.com/tags/ref_entities.asp)