允许background-image:在html净化器中嵌入数据

时间:2016-10-24 14:57:27

标签: php html htmlpurifier

我是html净化器的新手,我正在尝试根据自己的需要配置这个库。

所以我有这个html来源:

<div style="background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAA8CAYAAABIFuztAAA....);">Text</div>

我的配置是:

$config->set('URI.AllowedSchemes', array('http' => true, 'https' => true, 'mailto' => true, 'ftp' => true, 'nntp' => true, 'news' => true, 'data' => true));

1 个答案:

答案 0 :(得分:-1)

在下一个版本中修复的HTML净化器库中的错误。 https://github.com/ezyang/htmlpurifier/commit/5070404376d3b4287ce5c6bfae13e888b464742d

相关问题