summaryrefslogtreecommitdiffstats
path: root/Lib/html/parser.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-02-01 20:54:43 (GMT)
committerGitHub <noreply@github.com>2021-02-01 20:54:43 (GMT)
commit0874491bcc392f7bd9c394ec2fdab183e3f320dd (patch)
treed505371e35cb21031902f1585bec0bd62a70eeda /Lib/html/parser.py
parent304f9d2622fa4fd0833d60d31ddf7321a6a8141b (diff)
downloadcpython-0874491bcc392f7bd9c394ec2fdab183e3f320dd.zip
cpython-0874491bcc392f7bd9c394ec2fdab183e3f320dd.tar.gz
cpython-0874491bcc392f7bd9c394ec2fdab183e3f320dd.tar.bz2
bpo-41748: Handles unquoted attributes with commas (GH-24072)
* bpo-41748: Adds tests for unquoted attributes with comma * bpo-41748: Handles unquoted attributes with comma * bpo-41748: Addresses review comments * bpo-41748: Addresses review comments * Adds more test cases * Simplifies the regex for handling spaces * bpo-41748: Moves attributes tests under the right class * bpo-41748: Addresses review about duplicate attributes * bpo-41748: Adds NEWS.d entry for this patch (cherry picked from commit 9eb11a139fac5514d8456626806a68b3e3b7eafb) Co-authored-by: Karl Dubost <karl+github@la-grange.net>
Diffstat (limited to 'Lib/html/parser.py')
-rw-r--r--Lib/html/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 6083077..9e49eff 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -46,7 +46,7 @@ locatestarttagend_tolerant = re.compile(r"""
|"[^"]*" # LIT-enclosed value
|(?!['"])[^>\s]* # bare value
)
- (?:\s*,)* # possibly followed by a comma
+ \s* # possibly followed by a space
)?(?:\s|/(?!>))*
)*
)?