2012-03-05 33 views

回答

0

您需要配置HTMLPurifier,讓你想要的標籤。

// array of allowed tags 
$tagsAllowed = array('object, iframe'); 

// for each tag, set it as allowed 
foreach ($tagsAllowed as $tag) 
{ 
    $config->set('HTML.Allowed', $tag); 
} 

// instantiate HTMLPurifier with the configuration 
$purifier = new HTMLPurifier($config); 

要接受來自你必須把他們「[」和「]」等之間的標籤的一些參數:

a[href] 

這從接受paramater HREF而不是任何其他。

相關問題