Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita32c604

Browse files
committed
Merge
2 parents38e27a7 +9d478a3 commita32c604

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/html5lib/html5parser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,11 @@ def startTagMeta(self, token):
731731
if"charset"inattributes:
732732
self.parser.tokenizer.stream.changeEncoding(attributes["charset"])
733733
elif"content"inattributes:
734-
data=inputstream.EncodingBytes(
735-
attributes["content"].encode(self.parser.tokenizer.stream.charEncoding[0]))
734+
# Encoding it as UTF-8 here is a hack, as really we should pass
735+
# the abstract Unicode string, and just use the
736+
# ContentAttrParser on that, but using UTF-8 allows all chars
737+
# to be encoded and as a ASCII-superset works.
738+
data=inputstream.EncodingBytes(attributes["content"].encode("utf-8"))
736739
parser=inputstream.ContentAttrParser(data)
737740
codec=parser.parse()
738741
self.parser.tokenizer.stream.changeEncoding(codec)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp