MyBB Community Forums
[Duplicate] MyBB Youtube Video Embedding - Printable Version

+- MyBB Community Forums (
+-- Forum: Development (
+--- Forum: MyBB 1.8 Development (
+---- Forum: 1.8 Bugs and Issues (
+----- Forum: Rejected (
+----- Thread: [Duplicate] MyBB Youtube Video Embedding (/thread-216672.html)

MyBB Youtube Video Embedding - Yota_Ninja - 2018-04-01

The returned link is corrupt when using the video tag to embed a YouTube video. This seems to be caused by calling htmlspecialchars_uni on the returned ID.

Examples of corrupt links:
<iframe width="560" height="315" src="//" target" frameborder="0" allowfullscreen=""></iframe>

<iframe width="560" height="315" src="//" target="_blank" rel=&quot;noopener&quot; class=&quot;mycode_url&quot;&gt;;/a&gt;" frameborder="0" allowfullscreen=""></iframe>

PHP Version 7.2.4
MyBB Version: 1.8.15
Template: video_youtube_embed

File:        /inc/class_parser.php
Function:    mycode_parse_video
Code:        $id = htmlspecialchars_uni($id);

File:        /inc/functions.php
Function:    htmlspecialchars_uni
Code:        $message = str_replace("\"", "&quot;", $message);

RE: MyBB Youtube Video Embedding - .m. - 2018-04-01

please see
see also