Hi! Thanks for the powerful library.
I use it via BeautifulSoup, and I find out this behavior:
from bs4 import BeautifulSoup
soup = BeautifulSoup("<p><span title='foo bar'>foo1</span><span title='foo\nbar'>foo1</span></p>", 'html.parser')
print(*soup.select('span[title*="bar"]'))
I expected this to print both spans, but the actual output is
<span title="foo bar">foo1</span>
It seems that *= considers only the first line of multi-line attribute:
print(*soup.select('span[title*="foo"]'))
prints this:
<span title="foo bar">foo1</span> <span title="foo
bar">foo1</span>
Is there some bug, or some conscious limitation, or \n in attribute values is against the standard?
Thanks!
Hi! Thanks for the powerful library.
I use it via BeautifulSoup, and I find out this behavior:
I expected this to print both spans, but the actual output is
It seems that
*=considers only the first line of multi-line attribute:prints this:
Is there some bug, or some conscious limitation, or
\nin attribute values is against the standard?Thanks!