mirror of
https://github.com/python/cpython.git
synced 2025-10-20 08:23:47 +00:00
gh-135661: Fix parsing attributes with whitespaces around the "=" separator in HTMLParser (GH-136908)
This fixes a regression introduced in GH-135930.
This commit is contained in:
parent
09dfb50f1b
commit
dee6501894
3 changed files with 18 additions and 19 deletions
|
@ -45,7 +45,7 @@
|
|||
(
|
||||
(?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]* # attribute name
|
||||
)
|
||||
(= # value indicator
|
||||
([\t\n\r\f ]*=[\t\n\r\f ]* # value indicator
|
||||
('[^']*' # LITA-enclosed value
|
||||
|"[^"]*" # LIT-enclosed value
|
||||
|(?!['"])[^>\t\n\r\f ]* # bare value
|
||||
|
@ -57,7 +57,7 @@
|
|||
[a-zA-Z][^\t\n\r\f />]* # tag name
|
||||
[\t\n\r\f /]* # optional whitespace before attribute name
|
||||
(?:(?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]* # attribute name
|
||||
(?:= # value indicator
|
||||
(?:[\t\n\r\f ]*=[\t\n\r\f ]* # value indicator
|
||||
(?:'[^']*' # LITA-enclosed value
|
||||
|"[^"]*" # LIT-enclosed value
|
||||
|(?!['"])[^>\t\n\r\f ]* # bare value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue