Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tostring(RestrictedElement('X')) produces funky output #25

Closed
ecederstrand opened this issue Aug 8, 2018 · 1 comment
Closed

tostring(RestrictedElement('X')) produces funky output #25

ecederstrand opened this issue Aug 8, 2018 · 1 comment

Comments

@ecederstrand
Copy link
Contributor

>>> from defusedxml.lxml import RestrictedElement, tostring
>>> from lxml.etree import Element
>>> tostring(Element('X'))
b'<X/>'
>>> tostring(RestrictedElement('X'))
b'<RestrictedElement>X</RestrictedElement>'

I was expecting it would serialise to b'<X/>'.

@tiran
Copy link
Owner

tiran commented Sep 18, 2018

defusedxml.lxml is no longer needed and supported. Nowadays libxml2 has builtin limitation for entity expansion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants