Fweeb/dokuwiki_plugin_html5video

Video-Syntax seems to throw the wiki parser off

Closed this issue · 4 comments

When I insert the video syntax any following text or wiki syntax doesn't display. e.g.

{{kinderwunder:messerschmieden.mp4|}}

{{tag>technik wie-sachen-gemacht-werden handwerk}}

This only shows the video, the tags don't show up. When I use the tags ABOVE the video syntax, it works. When I use them on other pages, they work fine.

This is with the latest version of the plugin and the lates DokuWiki.

That seems odd. Can you share a snippet of the HTML that's generated from these two tags in this order?

I had a look at the source and it gets even odder:

This wiki text:

======Monarchfalter schlüpft aus der Puppe======

{{:kinderwunder:monarchfalter.mp4|}}

{{tag>natur tiere insekten}}

Produces this HTML:

<!-- wikipage start -->               
<h1 class="sectionedit1" id="monarchfalter-schluepft-aus-der-puppe">Monarchfalter schlüpft aus der Puppe</h1>
<div class="level1">

<video src="http://www.cognoscere-causas.de/_media//kinderwunder/monarchfalter.mp4" width="640" height="360" controls="controls"  /><div class="tags"><span>

<a href="http://www.cognoscere-causas.de/tag/natur?do=showtag&amp;tag=natur" class="wikilink1" title="tag:natur" rel="tag">natur</a>,

<a href="http://www.cognoscere-causas.de/tag/tiere?do=showtag&amp;tag=tiere" class="wikilink1" title="tag:tiere" rel="tag">tiere</a>,

<a href="http://www.cognoscere-causas.de/tag/insekten?do=showtag&amp;tag=insekten" class="wikilink1" title="tag:insekten" rel="tag">insekten</a>

</span></div>
</div>
<!-- wikipage stop -->

So the tags are there in the HTML, the page also validates as HTML5 but nothing below the video shows up in the browser (I tried Safari, Firefox and Chrome).

Here’s a screenshot of the rendered page.

html5video

The tags should be there before the white content area ends.

Ah-ha! Did a little testing with Firebug. It turns out that although the implicit close for the video tag (" />") is valid HTML5, most browsers don't properly handle a div tag that follows after that. The solution was to use the explicit close tag.

Try it now and let me know if that solves your problem.

Works now. Thank you.