Michael A. Peters - 2009-03-21 22:05:47
My class operates on a DOMDocument object including manipulation of attributes.
The way it handles attributes is currently broken for xhtml documents.
When I list all attributes, it gives me all attributes - whether they are namespace's or not - IE - xml:lang
However, when deciding an attribute should be modified, the namespace is dropped.
What I need is a way to determine whether or not the attribute uses a namespace so I can use the correct namespace functions (IE $element->setAttributeNS etc.) in cases where the attribute uses a namespace.
Anyone know how to do that?
For an example of where this bug bites me - see the filterAttributes() function of my cspfilter class submitted here (in the class file).
You can also view my class at http://www.clfsrpm.net/xss/
(can't easily download it there though, I want to use this site as main distribution point, but the source is viewable there as .phps)
Any help on this would be greatly appreciated.