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:
@@ -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];
|
||||||
|
Reference in New Issue
Block a user