Passing a function as 'formatter' breaks on empty elements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
High
|
Unassigned |
Bug Description
In 4.6.1, passing a function as the 'formatter' argument to 'decode' (https:/
Test case:
from bs4 import BeautifulSoup
soup = BeautifulSoup(
soup.
Expected result (seen on 4.6.0):
'<html>
Actual result:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
File "/home/
File "/home/
formatter))
File "/home/
File "/home/
formatter))
File "/home/
File "/home/
formatter))
File "/home/
close = formatter.
AttributeError: 'function' object has no attribute 'void_element_
I am using html5lib (1.0.1) and Python 3.4.3.
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
Thanks for the detailed bug report. This is fixed in revision 474.