[issue41748] HTMLParser: comma in attribute values with/without space

karl report at bugs.python.org
Sun Jan 3 03:49:01 EST 2021


karl <karl+pythonbugs at la-grange.net> added the comment:

Ah!

This is fixing it

diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 6083077981..ffff790666 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -44,7 +44,7 @@
       (?:\s*=+\s*                    # value indicator
         (?:'[^']*'                   # LITA-enclosed value
           |"[^"]*"                   # LIT-enclosed value
-          |(?!['"])[^>\s]*           # bare value
+          |(?!['"])[^>]*           # bare value
          )
          (?:\s*,)*                   # possibly followed by a comma
        )?(?:\s|/(?!>))*




Ran 48 tests in 0.175s

OK

== Tests result: SUCCESS ==

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41748>
_______________________________________


More information about the Python-bugs-list mailing list