htmlpurifier with borderRadius

前提是你 提交于 2019-12-03 21:28:05

I forked the original repo and added functionality for border radius in the purifying function, code is found here

https://github.com/msvensson82/htmlpurifier

I basically just added this to the CSSDefinition.php file, if you wish to amend yours instead of getting my repo.

// border-radius
$border_radius =
$this->info['border-top-left-radius'] =
$this->info['border-top-right-radius'] =
$this->info['border-bottom-left-radius'] =
$this->info['border-bottom-right-radius'] = new HTMLPurifier_AttrDef_CSS_Composite(array(
 new HTMLPurifier_AttrDef_CSS_Length('0'),
 new HTMLPurifier_AttrDef_CSS_Percentage(true)
));
$this->info['border-radius'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_radius);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!