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

Fix ref regex #1

Open
AntonOfTheWoods opened this issue Dec 2, 2020 · 0 comments
Open

Fix ref regex #1

AntonOfTheWoods opened this issue Dec 2, 2020 · 0 comments

Comments

@AntonOfTheWoods
Copy link
Contributor

Currently the regex used for cleaning elements fails to take into account a somewhat common case where there is a / in an attribute:

This appears to be relatively common with <ref> , which has examples like:

<ref name="http://a.great.site/"/>

It appears that because there is a non-whitespace char between / and >, it fails. The current (warning, this will get refactored so don't just blindly search for the string!) regex is:

re.compile(r"<\s*%s\b[^>]*/\s*>" % tag, re.DOTALL | re.IGNORECASE) for tag in selfClosingTags

This needs tweaking

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

1 participant