cpython/Lib/test/support
Miss Islington (bot) 228509edab
Some checks failed
Tests / Check for source changes (push) Has been cancelled
Lint / lint (push) Has been cancelled
Tests / Ubuntu (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if the ABI has changed (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / Windows (push) Has been cancelled
Tests / macOS (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled
[3.11] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136291)
* 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:49 +02:00
..
__init__.py [3.11] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136291) 2025-07-12 14:26:49 +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 23:42:36 +03:00
import_helper.py [3.11] gh-116307: Proper fix for 'mod' leaking across importlib tests… (#116694) 2024-03-13 00:35:00 +00: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 [3.11] gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091) (GH-113100) 2023-12-14 14:01:01 +02:00
pty_helper.py [3.11] gh-108303: Move all doctest related files and tests to Lib/test/test_doctest/ (GH-112109) (#114313) 2024-01-19 16:12:48 +01:00
script_helper.py bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615) 2022-01-25 08:09:06 +01:00
socket_helper.py [3.11] gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) (#109042) 2023-09-07 00:34:16 +00:00
threading_helper.py [3.11] gh-111644: Fix support threading_cleanup() (GH-111714) (#111717) 2023-11-04 00:43:53 +00:00
warnings_helper.py gh-103109: Document ignore_warnings() test support helper (GH-103110) 2023-04-02 15:42:43 -07:00