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/element.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/element.py')
-rw-r--r-- | bs4/element.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bs4/element.py b/bs4/element.py index ba70b24..fb74f9c 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -21,6 +21,10 @@ from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) +nonwhitespace_re = re.compile(r"\S+") + +# NOTE: This isn't used as of 4.7.0. I'm leaving it for a little bit on +# the off chance someone imported it for their own use. whitespace_re = re.compile(r"\s+") def _alias(attr): |