Marked's HTML output is not valid XML, MMD's is.

chocolate.camera's Avatar

chocolate.camera

07 Jun, 2012 07:39 PM

Marked's output head contains some unclosed meta tags (did not check if others too). MMD uses the XHTML variant of closing all self-closing tags when generating fully formed HTML output.

While not closing tags is perfectly valid HTML, it clashes with XML workflows. On the other hand, outputting XHTML does not have an impact on HTML-only workflows, so the latter would be preferred, just like MMD does.

  1. Support Staff 1 Posted by Brett on 07 Jun, 2012 07:49 PM

    Brett's Avatar

    Specifically which headers are you talking about?

  2. Support Staff 2 Posted by Brett on 07 Jun, 2012 07:52 PM

    Brett's Avatar

    You mean this block?

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Compiled</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    This is only output when exporting with a theme, and the doctype is explicitly declared as HTML, not XHTML. In what cases would you need to process a pure html document as XML?

  3. 3 Posted by chocolate.camer... on 07 Jun, 2012 08:03 PM

    chocolate.camera's Avatar

    Yes, that block.

    XSLT for example.

    Closing tags is as much HTML as not closing them, but avoids potential integration problems where valid XML may be required. Furthermore, in Marked's output, the body does have all tags closed (such as br/). What is the value in having that inconsistency of closing in some places not in others?

    I think it is reasonable to expect that Marked's output will sometimes be reused in other environments, and closing those tags does not present any drawback that I can think of. Can you?

  4. Support Staff 4 Posted by Brett on 07 Jun, 2012 08:28 PM

    Brett's Avatar

    Nah, not a big deal. Added them in for the next release.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac