cpython/Lib/test/support
Miss Islington (bot) 6c97200861
[3.9] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136293)
* 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 data loss after unclosed script or style tag (gh-86155).

Also backport test.support.subTests() (gh-135120).

---------
(cherry picked from commit 0243f97cba)
(cherry picked from commit c555f889c3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Waylan Limberg <waylan.limberg@icloud.com>
2025-07-12 14:27:08 +02:00
..
__init__.py [3.9] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136293) 2025-07-12 14:27:08 +02:00
bytecode_helper.py bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168) 2019-09-12 10:02:59 +01:00
hashlib_helper.py [3.9] bpo-45042: Now test classes decorated with requires_hashdigest are not skipped (GH-28060) (GH-28169) 2021-09-05 09:41:33 +03:00
logging_helper.py bpo-40275: Avoid importing logging in test.support (GH-19601) 2020-04-25 11:35:18 +03:00
script_helper.py bpo-38991: Remove test.support.strip_python_stderr() (GH-17490) 2019-12-08 08:38:16 +01:00
socket_helper.py bpo-40275: Fix name error in support.socket_helper (GH-19825) 2020-05-01 02:35:24 +02:00
testresult.py [3.9] bpo-45057: Simplify RegressionTestResult (GH-28081) (GH-28103) 2021-09-01 09:45:09 +03:00
warnings_helper.py [3.9] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27785) 2021-08-16 22:47:08 +02:00