HTML Purifier 4.2.0 的 IRC URI 方案请求
有人可以帮助我为 HTML Purifier 4.2.0 建立使用 IRC URI 方案吗?我似乎不知道如何配置或修改哪些文件,以便纯化的 html 允许 irc:// 链接。
我是否可以简单地修改以下代码块中的配置?
require_once "htmlpurifier-4.2.0/library/HTMLPurifier.standalone.php";
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set("HTML.Doctype", "XHTML 1.0 Strict");
$purifier = new HTMLPurifier($purifier_config);
更新:
我编辑了library/standalone/HTMLPurifier/ConfigSchema/schema.ser,将“4:nntp”的两个实例更改为“3:irc”并发现错误:
警告:目录htmlpurifier-4.2.0/library/standalone/HTMLPurifier/DefinitionCache /Serializer/URI 不可写,请 chmod 到 777
我相信这将有助于在进行此更改后建立对 IRC URI 方案的支持。我稍后会报告。
嗯,设为可写后,没有出现错误,但是没有结果=\
Can someone help me to establish using IRC URI Scheme for HTML Purifier 4.2.0? I can't seem to figure out how to configure or which files to modify so that purified html allows for irc:// links.
Is it possible I can simply modify configuration within the following code block?
require_once "htmlpurifier-4.2.0/library/HTMLPurifier.standalone.php";
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set("HTML.Doctype", "XHTML 1.0 Strict");
$purifier = new HTMLPurifier($purifier_config);
Update:
I edited library/standalone/HTMLPurifier/ConfigSchema/schema.ser changing both instances of "4:nntp" to "3:irc" and found error:
Warning: Directory htmlpurifier-4.2.0/library/standalone/HTMLPurifier/DefinitionCache/Serializer/URI not writable, please chmod to 777
I believe this will help to establish support for IRC URI Scheme after making this change. I'll report back in a bit.
Hmm, after making it writable, no error appeared, but no results =\
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HTML Purifier 似乎没有对 IRC 方案的本机支持。但是:你尝试过这样的事情吗?将其放入
/library/HTMLPurifier/URIScheme
中,或者确保自动加载找到它:...并使用...更改您的配置...
这可能无法开箱即用,但我认为这应该是正确的方向......
HTML Purifier doesn't seem to have a native support for the IRC scheme. But: Have you tried something like this? Put this in
/library/HTMLPurifier/URIScheme
, or otherwise make sure that autoloading finds it:...and change your configuration with...
That may not work out of the box, but I'm thinking that should be the right direction...