From b514575d5fb99b20e826009213605c2840ee6b07 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 30 Dec 2018 21:13:03 -0500 Subject: Fixed a problem with multi-valued attributes where the value contained whitespace. Thanks to Jens Svalgaard for the fix. [bug=1787453] --- bs4/element.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bs4/element.py') 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): -- cgit v1.2.3