bug 320008: Double-quotes in attributes in constructs parsed by the XML constructor get double-escaped, turning into " r=brendan

This commit is contained in:
mrbkap%gmail.com 2005-12-16 23:02:22 +00:00
parent ee4e4f20ee
commit cd4f6d4a38

View File

@ -1249,7 +1249,7 @@ js_GetToken(JSContext *cx, JSTokenStream *ts)
* so escape " if it is expressed directly in a single-quoted
* attribute value.
*/
if (c == '"') {
if (c == '"' && !(ts->flags & TSF_XMLONLYMODE)) {
JS_ASSERT(qc == '\'');
js_AppendCString(&ts->tokenbuf, js_quot_entity_str);
continue;