8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03c7960 commit 9dc584cCopy full SHA for 9dc584c
src/html5lib/inputstream.py
@@ -729,7 +729,7 @@ def codecName(encoding):
729
string doesn't correspond to a valid encoding."""
730
if type(encoding) == bytes:
731
encoding = str(encoding, "ascii")
732
- if (encoding is not None and type(encoding) in str):
+ if (encoding is not None) and (type(encoding) == str):
733
canonicalName = ascii_punctuation_re.sub("", encoding).lower()
734
return encodings.get(canonicalName, None)
735
else:
0 commit comments