HTML Purifier正在删除iframe

时间:2014-01-01 19:20:11

标签: php htmlpurifier

我需要允许放置iframe youtube视频,但我遇到问题,因为当我通过时:

<iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/JTc1mDieQI8" width="640"></iframe>

我明白了:

<iframe></iframe>

我的配置是:

"HTML.SafeIframe" => 'true',
        "URI.SafeIframeRegexp" => "%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%",
        'HTML.Allowed' => 'pre[class],iframe'

0 个答案:

没有答案