Fix broken HTML markup
authorjoshuaruesweg <ruesweg@woltlab.com>
Mon, 22 Jun 2020 14:44:05 +0000 (16:44 +0200)
committerjoshuaruesweg <ruesweg@woltlab.com>
Mon, 22 Jun 2020 14:44:16 +0000 (16:44 +0200)
The video can be placed within normal text (inside `<p>` elements). `<div>` elements are not allowed within `<p>` elements. Because the class `.videoContainer` is already a block element (via CSS), we can easily change the element type to `<span>`, which is allowed inside of `<p>` elements.

com.woltlab.wcf/templates/__videoAttachmentBBCode.tpl

index da69480dbbdc70a0cf06e2d99f1f6a05e5ac251d..4343043bfbc99c7a0d03c3d267647133ff454353 100644 (file)
@@ -1,6 +1,6 @@
-<div id="attachmentVideo_{@$attachmentIdentifier}" class="videoContainer" style="display: none;">
+<span id="attachmentVideo_{@$attachmentIdentifier}" class="videoContainer" style="display: none;">
        <video src="{link controller='Attachment' object=$attachment}{/link}" controls></video>
-</div>
+</span>
 
 <a id="attachmentVideoLink_{@$attachmentIdentifier}" href="{link controller='Attachment' object=$attachment}{/link}">{$attachment->filename}</a>