xhtml - How to properly escape quotes inside html attributes? -
i have drop down on web page breaking when value string contains quote.
the value "asd
in dom appears empty string.
i have tried every way know escape string no avail.
<option value=""asd">test</option> <option value="\"asd">test</option> <option value=""asd">test</option> <option value=""asd">test</option>
any idea how render on page postback message contains correct value?
"
correct way, third of tests:
<option value=""asd">test</option>
you can see working in jsfiddle example here. alternatively, can delimit attribute value single quotes:
<option value='"asd'>test</option>
Comments
Post a Comment