Is it possible to filter video embed with htmlspecialchars()

I am allowing users to embed videos on their page, but just in case I want to filter the output. To present the video I retrieve the embed statement from the database but when it is filtered, it is presented in raw code. Is there a video friendly way to filter something like this or does anyone have any suggestions on a different way to do it? Thanks in advance for any advice. while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $video= htmlspecialchars( $row['video'], ENT_NOQUOTES, 'UTF-8' ); } echo "$video"; In the database, the video will look like this for example
Aqua Teen Hunger Force - Hand Banana - Watch more Funny Videos

以上就是Is it possible to filter video embed with htmlspecialchars()的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏