1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 20:51:53 +02:00

YouTube BBcode - added https:// to allowed URLs

This commit is contained in:
Moc 2014-06-26 12:46:29 +02:00
parent 6eb07612c4
commit 88bd9796ef

View File

@ -1,18 +1,10 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2001-2002 Steve Dunstan (jalist@e107.org)
| Copyright (C) 2008-2013 e107 Inc (e107.org)
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
+----------------------------------------------------------------------------+
*/
/**
* Copyright (C) e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* YouTube BBcode
*/
if (!defined('e107_INIT')) { exit; }
/**
@ -56,7 +48,7 @@ class bb_youtube extends e_bb_base
// Convert Simple URLs.
if(strpos($code_text,"youtube.com/watch?v=")!==FALSE || strpos($code_text,"youtube.com/watch#!v=")!==FALSE )
{
$validUrls = array("http://","www.","youtube.com/watch?v=","youtube.com/watch#!v=");
$validUrls = array("http://", "https://", "www.","youtube.com/watch?v=","youtube.com/watch#!v=");
$tmp = str_replace($validUrls,'',$code_text);
$qrs = explode("&",$tmp);
$code_text = $qrs[0];