I have a drop down on a web page which is breaking when the value string contains a quote.
The value is \"asd, but in the DOM it always appears as an em
\"asd
" is the correct way, the third of your tests:
"
test
You can see this working below, or on jsFiddle.
alert($("option")[0].value);
Test
Alternatively, you can delimit the attribute value with single quotes: