Allow "@" in unquoted attribute values.

Added test that checks for characters allowed in the query part of URLs.
Backport candidate.
This commit is contained in:
Fred Drake 2003-04-29 22:12:55 +00:00
parent b616f17902
commit 75ab1462d5
2 changed files with 10 additions and 1 deletions

View file

@ -33,7 +33,7 @@ endbracket = re.compile('[<>]')
tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
attrfind = re.compile(
r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"]*))?')
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*))?')
class SGMLParseError(RuntimeError):