链接和 html purfier 的老问题。 我正在使用这段代码:
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'p,b,a[href],i');
$config->set('HTML.AllowedAttributes', 'a.href');
$purifier = new HTMLPurifier($config);
但是这不起作用。 输入
<a href="http://www.google.de">search</a>
将转向
<a href="%5C">search</a>
有什么想法吗?
最佳答案
关于html 净化器 - 允许链接吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12012261/