You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Whitespaces no longer accepted between `</` and the tag name.
E.g. `</ script>` does not end the script section.
* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
as whitespaces. The only whitespaces are `\t\n\r\f `.
* Null character (U+0000) no longer ends the tag name.
* Attributes and slashes after the tag name in end tags are now ignored,
instead of terminating after the first `>` in quoted attribute value.
E.g. `</script/foo=">"/>`.
* Multiple slashes and whitespaces between the last attribute and closing `>`
are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.
* Multiple `=` between attribute name and value are no longer collapsed.
E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".
* Whitespaces between the `=` separator and attribute name or value are no
longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
"=bar", both with value None; `<a foo= bar>` produces two attributes:
"foo" with value "" and "bar" with value None.
* Fix Sphinx errors.
* Apply suggestions from code review
Co-authored-by: Ezio Melotti <[email protected]>
* Address review comments.
* Move to Security.
---------
Co-authored-by: Ezio Melotti <[email protected]>
Copy file name to clipboardExpand all lines: Lib/html/parser.py
+69-74Lines changed: 69 additions & 74 deletions
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,43 @@
31
31
piclose=re.compile('>')
32
32
commentclose=re.compile(r'--\s*>')
33
33
# Note:
34
-
# 1) if you change tagfind/attrfind remember to update locatestarttagend too;
35
-
# 2) if you change tagfind/attrfind and/or locatestarttagend the parser will
34
+
# 1) if you change tagfind/attrfind remember to update locatetagend too;
35
+
# 2) if you change tagfind/attrfind and/or locatetagend the parser will
36
36
# explode, so don't do it.
37
-
# see http://www.w3.org/TR/html5/tokenization.html#tag-open-state
38
-
# and http://www.w3.org/TR/html5/tokenization.html#tag-name-state
0 commit comments