Iíve been building web sites for over 13 years and have been escaping HTML for years. You know, converting
". Easy stuff, right? Then why did I completely forget that you have to do the same within attributes? Perhaps I just never had a need or realized that it was required. It is. Even more surprisingly, I should have known. Use an HTML validator on a URL with an ampersand in it and it may complain that the entity doesn't exist. Iíve run into that before and quickly converted it. So, why did it not dawn on me when a client ran into the problem when adding quotes to a picture title? Such an easy fix that threw me for a loop. The problem was that I wasnít quoting the attributes within an input field's value attribute. All I had to do was a simple conversion in perl and all was better. For those that need a visual, it should look like this:
<input name="test" type="text" value="I'm "quoted"">
Yes. Iím such a boob.