2010-09-29 115 views
0

我使用這種配置:允許在HTMLPurifier中嵌入標籤?

$config = HTMLPurifier_Config::createDefault(); 
$config->set('Core.Encoding', 'UTF-8'); 
$config->set('HTML.Doctype', 'XHTML 1.0 Strict'); 
$config->set('HTML.SafeObject', true); 
$config->set('Output.FlashCompat', true); 
$config->set('HTML.Allowed', 'object[width|height|data],param[name|value],embed[src|type|allowscriptaccess|allowfullscreen|width|height|wmode]'); 
$purifier = new HTMLPurifier($config); 

但像這一切嵌入標籤越來越剝離:

<embed allowfullscreen="true" height="480" src="apps/viral_player/player-viral.swf?file=../../data/media/video/1.flv" width="720" wmode="transparent"></embed> 

有沒有什麼辦法讓HTMLPurifier不脫衣嵌入標籤?

回答

3

嘗試HTML.SafeEmbed?