Skip to content

inline html problem with <body> and <html> tags #603

@daniele-niero

Description

@daniele-niero

Let's consider this simple script:

import markdown
md = markdown.Markdown(output_format='html5')
html = md.convert("<div>Hello World!</div>")
print(html) 

this correctly outputs:

<div>Hello World!</div>

However if the tag is body or html the output is:

<p><body>Hello World!</body></p>

which seems wrong to me.

Am I missing something or have I found a bug?

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