mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update web-platform-tests to revision 3678c44dfe811f93a796285e9531ee34d7d15682
This commit is contained in:
parent
6fbf2c1e3c
commit
b3ccbe1a35
27 changed files with 808 additions and 100 deletions
|
@ -12,7 +12,7 @@ import codecs
|
|||
import collections
|
||||
from xml import dom
|
||||
import html5lib
|
||||
from html5lib import treebuilders, inputstream
|
||||
from html5lib import treebuilders
|
||||
from lxml import etree
|
||||
from lxml.etree import ParseError
|
||||
from Utils import getMimeFromExt, escapeToNamedASCII, basepath, isPathInsideBase, relativeURL, assetName
|
||||
|
@ -1363,10 +1363,8 @@ class HTMLSource(XMLSource):
|
|||
if data:
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
htmlStream = html5lib.inputstream.HTMLInputStream(data)
|
||||
if ('utf-8-sig' != self.encoding): # if we found a BOM, respect it
|
||||
self.encoding = htmlStream.detectEncoding()[0]
|
||||
self.tree = self.__parser.parse(data, encoding = self.encoding)
|
||||
self.tree = self.__parser.parse(data)
|
||||
self.encoding = self.__parser.documentEncoding
|
||||
self.injectedTags = {}
|
||||
else:
|
||||
self.tree = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue