'xml:' namespace causes lxml treebuilder crash

Bug #1065617 reported by Leonard Richardson on 2012-10-11
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Beautiful Soup

Bug Description

The "xml:" namespace is bound by definition to the namespace URL "http://www.w3.org/XML/1998/namespace". But the lxml tree builder doesn't know this.

When lxml finds a tag with an "xml:" attribute, it tells the tree builder that the tag's namespace is "http://www.w3.org/XML/1998/namespace". The tree builder can't find this namespace in its mapping, so it says the namespace is None, which causes a crash.

Problematic document:

<a xml:lang="foo">bar</a>

Leonard Richardson (leonardr) wrote :

Fixed in revision 266.

Changed in beautifulsoup:
status: New → Fix Committed
Changed in beautifulsoup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers