[Duplicate] MyBB Youtube Video Embedding
#1
This user has been denied support. This user has been denied support.
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="//www.youtube.com/embed/wOMwO5T3yT4" target" frameborder="0" allowfullscreen=""></iframe>

<iframe width="560" height="315" src="//www.youtube.com/embed/wOMwO5T3yT4" target="_blank" rel=&quot;noopener&quot; class=&quot;mycode_url&quot;&gt;https://www.youtube.com/watch#wOMwO5T3yT4&lt;/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);
Reply
#2
please see https://github.com/mybb/mybb/issues/3066
see also https://github.com/mybb/mybb/issues/3085
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)