diff options
author | Leonard Richardson <leonardr@segfault.org> | 2018-12-30 21:13:03 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2018-12-30 21:13:03 -0500 |
commit | b514575d5fb99b20e826009213605c2840ee6b07 (patch) | |
tree | df4402d0879aa25ee7c04cec14445689b5366811 /bs4/builder/__init__.py | |
parent | 35668fff221abe596439c8950747ae1cffc8e21e (diff) |
Fixed a problem with multi-valued attributes where the value
contained whitespace. Thanks to Jens Svalgaard for the
fix. [bug=1787453]
Diffstat (limited to 'bs4/builder/__init__.py')
-rw-r--r-- | bs4/builder/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py index 46b28bd..4207750 100644 --- a/bs4/builder/__init__.py +++ b/bs4/builder/__init__.py @@ -8,7 +8,7 @@ from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, HTMLAwareEntitySubstitution, - whitespace_re + nonwhitespace_re ) __all__ = [ @@ -173,7 +173,7 @@ class TreeBuilder(object): # values. Split it into a list. value = attrs[attr] if isinstance(value, basestring): - values = whitespace_re.split(value) + values = nonwhitespace_re.findall(value) else: # html5lib sometimes calls setAttributes twice # for the same tag when rearranging the parse |