Closed HypeMC closed 1 year ago
The <video> tag is incorrectly marked as a block element, while it's actually an inline one according to MDN.
<video>
This causes the following problem:
use Masterminds\HTML5; $html5 = new HTML5(); $dom = $html5->loadHTMLFragment('<p>Test: <video><source src="/path/to/video.mp4" /></video></p>'); echo $html5->saveHTML($dom);
Result:
<p>Test: </p><video><source src="/path/to/video.mp4"></video>
Even though having a <video> tag inside a <p> tag is valid HTML, it gets moved outside the <p> tag.
<p>
thank you
The
<video>
tag is incorrectly marked as a block element, while it's actually an inline one according to MDN.This causes the following problem:
Result:
Even though having a
<video>
tag inside a<p>
tag is valid HTML, it gets moved outside the<p>
tag.