diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index 829d5d0c40b..933202e81f6 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -496,7 +496,7 @@ pub fn parse_html(page: &Page, match msg { Payload(data) => { // FIXME: use Vec (html5ever #34) - let data = String::from_utf8(data).unwrap(); + let data = UTF_8.decode(data.as_slice(), DecodeReplace).unwrap(); parser.tokenizer().borrow_mut().feed(data); } Done(Err(err)) => { diff --git a/tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini index fbfed5cf272..f1d83359558 100644 --- a/tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/open-url-encoding.htm.ini @@ -1,3 +1,5 @@ [open-url-encoding.htm] type: testharness - expected: CRASH + [XMLHttpRequest: open() - URL encoding] + expected: FAIL + diff --git a/tests/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini deleted file mode 100644 index 5cd8ba36901..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/send-content-type-string.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[send-content-type-string.htm] - type: testharness - expected: CRASH diff --git a/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini index d3c5b4afeaf..d35f507ee10 100644 --- a/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/send-entity-body-document.htm.ini @@ -1,3 +1,3 @@ [send-entity-body-document.htm] type: testharness - expected: CRASH + expected: TIMEOUT