", "", $sHtml); if (preg_match_all("//si", $sHtml, $aResult)) { foreach ($aResult[1] as $key => $sItem) { preg_match('/width="([0-9]+)"/', $sItem, $width); $iWidth = $width[1]; preg_match('/height="([0-9]+)"/', $sItem, $height); $iHeight = $height[1]; $sDolUrl = preg_quote(BX_DOL_URL_ROOT); $sIframeUrl = ''; if (preg_match("#({$sDolUrl}[a-zA-Z0-9_=\-\?\&\/]+)#", $sItem, $aMatches)) $sIframeUrl = $aMatches[1]; if (preg_match("#src=\"(((?!//)(?![a-z]+://)(?![a-z]+://))[a-zA-Z0-9_=\-\?\&\/]+)#", $sItem, $aMatches)) $sIframeUrl = $aMatches[1]; if ($sIframeUrl) $sHtml = str_replace($aResult[0][$key], '', $sHtml); } } } return $sHtml; } public function postFilter($sHtml, $config, $context) { $sPostRegex = '#]+)>#'; $sHtml = preg_replace_callback($sPostRegex, array($this, 'postFilterCallback'), $sHtml); return $sHtml; } protected function postFilterCallback($aMatches) { return ''; } }