HTML doesn't pass through correctly

BobTodd's Avatar

BobTodd

16 Apr, 2018 04:56 PM

Howdy,

I tried composing a page in MMD with the following basic content:

### Video

<video width="320" height="240" controls>
    <source src="https://utexas.box.com/s/b5o46txsx7kunswyx9l3qwbcxngcntdg" type="video/mp4">
Your browser might not support the video tag.
</video> 

### Speaker

Some Speaker

I was referring to this page for the vanilla way to include a video in an HTML document.

When I exported my MMD document to HTML, I had thought that the HTML would pass through unaffected. But the resulting HTML file had the following:

<h3 id="video">Video</h3>

<p>&lt;video width=&#8220;320&#8221; height=&#8220;240&#8221; controls&gt;
<source src="https://utexas.box.com/s/b5o46txsx7kunswyx9l3qwbcxngcntdg" type="video/mp4">
Your browser might not support the video tag.</p>

</video> 

<h3 id="speaker">Speaker</h3>

<p>Some Speaker</p>

That is, no video appears because the angle brackets of the <video> tags have been changed to &lt; and &gt; (and everything wrapped in <p> tags).

Am I perhaps missing something about how I should pass HTML through Markdown?

Peace out,
t

  1. Support Staff 1 Posted by Fletcher on 17 Apr, 2018 04:00 PM

    Fletcher's Avatar

    Has to do with the boolean attribute (controls) not being recognized as HTML. Fixed in MMD itself, and will be fixed in next Composer release.

    See this thread on Twitter for details if interested (assuming I linked properly):

    https://twitter.com/j_holtslander/status/975937849756344320

    Thanks,

    Fletcher

  2. Fletcher closed this discussion on 17 Apr, 2018 04:00 PM.

  3. BobTodd re-opened this discussion on 23 May, 2018 04:39 PM

  4. 2 Posted by BobTodd on 23 May, 2018 04:39 PM

    BobTodd's Avatar

    Howdy,

    I just upgraded to the latest version (4.4.2) of MMDC (thanks for the tabs!), but I'm still finding this behavior: this HTML

    <iframe  width="425" height="344" src="https://utexas.box.com/v/epps-language-contact-480p30" frameborder="0" allowfullscreen></iframe>
    

    in a Markdown file gets compiled in the exported HTML file to

    <p>&lt;iframe width=&#8220;425&#8221; height=&#8220;344&#8221; src=&#8220;https://utexas.box.com/v/epps-language-contact-480p30&#8221; frameborder=&#8220;0&#8221; allowfullscreen&gt;</iframe></p>
    

    Is there some setting I have to change so that this compiles correctly?

    Thanks for the help.

    Peace out,
    t

  5. Support Staff 3 Posted by Fletcher on 23 May, 2018 06:11 PM

    Fletcher's Avatar

    boolean HTML properties have to be added to MultiMarkdown individually.

    Properties of this form work automatically:

    foo="bar"

    Boolean properties don't:

    allowfullscreen

    Unfortunately, it seems that adding an exhaustive list causes a **huge**
    increase in compilation time (making it practically infeasible for me to
    do this, given the number of times that I recompile MMD while working on
    it), so I have to add them one by one.

    (If you compile MMD yourself, the code can be modified to change this
    behavior -- `scanners.re` and QuickStart Guide, search for boolean.

    However, since Composer uses a built-in copy of MultiMarkdown, only I
    can compile and change the settings. As described in the guide, for a
    variety of reasons I use a hand-curated list of boolean properties.

    I can add `allowfullscreen` to that list, but I can't add all of them.
    (At least not unless I can find a different way to handle it.)

    F-

  6. 4 Posted by BobTodd on 23 May, 2018 07:28 PM

    BobTodd's Avatar

    Howdy Fletcher,

    Oh, I see. Thanks for the explanation. That makes sense. I appreciate
    the help.

    Peace out,
    t

  7. Support Staff 5 Posted by Fletcher on 23 May, 2018 07:47 PM

    Fletcher's Avatar

    If you find other examples that you use regularly let me know.

    Thanks,

    Fletcher

    Sent from my iPhone

  8. Fletcher closed this discussion on 24 May, 2018 01:22 AM.

Comments are currently closed for this discussion. You can start a new one.

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