aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/parse/html.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r--components/script/parse/html.rs2
1 files changed, 1 insertions, 1 deletions
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<u8> (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)) => {