Archive for the ‘html’ Category

If you have a form like

<input type=”text” name=”go” value=”some stuff”>

how do you deal with “some stuff” when the value is “I’m going to “say” hello”

(ie two many quotes).  the answer is

single quote ‘ -> &#39

double quote ” -> &#34

as you can see by example with this html code fragment

<input size=50 name=text value=”abc123 `~!@#$%^&*()_+-=[]{}\|;&#39:,./<>?&#34″>

so interestingly enough, you don’t need to escape the other chars if the value is wrapped in “.