Can't insert an element before or after an identical element
Bug #1810692 reported by
Leonard Richardson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This works in 4.6.3 but not in 4.7.0 (reported by Alex Krupp):
--
text = '<br>'
soup = BeautifulSoup(text, "lxml")
for br_tag in soup.find_
br_tag.
--
Isaac's comment:
The self check is definitely a bug. insert_before and insert_after can now take multiple arguments, and in the original proposal, we looped through the arguments checking if the tag to be inserted **is** self, the check was moved out of the loop (which makes sense) so we could do the check once, but it is now checking if self is **in** args which is doing check of **equality**, which we do not want to do.
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in revision 495.