Skip to content

Fix ref regex #1

@AntonOfTheWoods

Description

@AntonOfTheWoods

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions