Skip to content

why does _serialize_html downcase the closing tag? #237

@eichin

Description

@eichin

It doesn't matter for html and xhtml, but I'm updating some code that used python-markdown 2.0.x to generate RSS to current versions, and I'm getting output with <pubDate>...</pubdate> - that is, the tags don't match (rss is not case-insensitive, or at least most of the XML-based tools for chewing on it aren't.) _serialize_html at https://github.com/waylan/Python-Markdown/blob/master/markdown/serializers.py#L179 downcases the tag to compare it against some constants (script, style, HTML_EMPTY) which seems sensible, but then it writes out the downcased version and not the original.

Should I instead be writing a custom serializer (2.0 didn't even have them so it didn't come up...) or are there other approaches that make sense now?

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