1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +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 <?php
/* /**
+ ----------------------------------------------------------------------------+ * Copyright (C) e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
| e107 website system *
| * YouTube BBcode
| 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).
|
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
/** /**
@@ -56,7 +48,7 @@ class bb_youtube extends e_bb_base
// Convert Simple URLs. // Convert Simple URLs.
if(strpos($code_text,"youtube.com/watch?v=")!==FALSE || strpos($code_text,"youtube.com/watch#!v=")!==FALSE ) 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); $tmp = str_replace($validUrls,'',$code_text);
$qrs = explode("&",$tmp); $qrs = explode("&",$tmp);
$code_text = $qrs[0]; $code_text = $qrs[0];