Created
June 8, 2015 04:39
-
-
Save softsolution/5d6e6fea645aa34970e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function video_2html($elem) { | |
$str = '<div class="bb_tag_video">'; | |
foreach ($elem['val'] as $item) { | |
if ($item['type']=='item') { continue; } | |
$item['str'] = preg_replace('/<iframe.*>.+<\/iframe>/iu', '', $item['str']); | |
$str .= strip_tags($item['str'], '<iframe><object><param><embed>'); | |
} | |
$str .= '</div>'; | |
return cmsCore::htmlCleanUp($str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment