cpython/Lib/test/support
Miss Islington (bot) 151e0f00f7
[3.10] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136292)
* 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:26:58 +02:00
..
__init__.py [3.10] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136292) 2025-07-12 14:26:58 +02:00
bytecode_helper.py bpo-42199: Fix bytecode_helper assertNotInBytecode (#23031) 2020-12-17 16:30:29 -08:00
hashlib_helper.py bpo-45042: Now test classes decorated with requires_hashdigest are not skipped (GH-28060) 2021-09-04 14:04:44 -07:00
import_helper.py bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) (GH-31207) 2022-02-08 13:04:05 -08:00
interpreters.py bpo-32604: Clean up test.support.interpreters. (gh-20926) 2020-06-16 18:24:40 -06:00
logging_helper.py bpo-40275: Avoid importing logging in test.support (GH-19601) 2020-04-25 11:35:18 +03:00
os_helper.py bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739) 2022-01-21 19:31:25 +02:00
script_helper.py bpo-42639: Add script_helper.run_test_script() (GH-23777) 2020-12-15 16:08:16 +01:00
socket_helper.py Fix broken link to MSDN (GH-102355) 2023-03-13 06:41:01 -07:00
testresult.py bpo-45057: Simplify RegressionTestResult (GH-28081) (GH-28101) 2021-09-01 09:45:46 +03:00
threading_helper.py [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804) 2021-10-07 11:49:47 -04:00
warnings_helper.py gh-103109: Document ignore_warnings() test support helper (GH-103110) 2023-04-02 15:38:58 -07:00