From c59b72aa804e313885ad8b9b0196c61b9bba1755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Perales?= Date: Mon, 7 Apr 2014 16:07:04 -0500 Subject: [PATCH] Fix issues with YouTube embedding - refs BT#7930 --- .../htmlpurifier/library/HTMLPurifier/Filter/AllowIframes.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/inc/lib/htmlpurifier/library/HTMLPurifier/Filter/AllowIframes.php b/main/inc/lib/htmlpurifier/library/HTMLPurifier/Filter/AllowIframes.php index b0276abb5d..09980ddbb6 100644 --- a/main/inc/lib/htmlpurifier/library/HTMLPurifier/Filter/AllowIframes.php +++ b/main/inc/lib/htmlpurifier/library/HTMLPurifier/Filter/AllowIframes.php @@ -46,8 +46,7 @@ class HTMLPurifier_Filter_AllowIframes extends HTMLPurifier_Filter protected function postFilterCallback($matches) { // Domain Whitelist - - $youTubeMatch = preg_match('#src="https?://www.youtube(-nocookie)?.com/#i', $matches[1]); + $youTubeMatch = preg_match('#src="(https:)?//www.youtube(-nocookie)?.com/#i', $matches[1]); $vimeoMatch = preg_match('#src="http://player.vimeo.com/#i', $matches[1]); $googleMapsMatch = preg_match('#src="https://maps.google.com/#i', $matches[1]);