Fix issues with YouTube embedding - refs BT#7930

1.9.x
César Perales 12 years ago committed by Yannick Warnier
parent 1ff7113454
commit c59b72aa80
  1. 3
      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]);

Loading…
Cancel
Save