6
我正在使用htmlpurifier清理用戶內容。我試圖刪除內聯樣式屬性,如htmlpurifier remove inline css
<div style="float:left">some text</div>
我想刪除整個樣式屬性。
如何使用htmlpurifier來做到這一點?
我正在使用htmlpurifier清理用戶內容。我試圖刪除內聯樣式屬性,如htmlpurifier remove inline css
<div style="float:left">some text</div>
我想刪除整個樣式屬性。
如何使用htmlpurifier來做到這一點?
只要通過它的不應該除去有效的CSS屬性(白名單的方法)的陣列調整所述AllowedProperties配置。
然而,下面應該刪除所有的CSS屬性
$config->set('CSS.AllowedProperties', array());
它的工作,謝謝。 – applechief
再次感謝!可愛的方案) – opuhliyvladyslav