我在各个网站上看到了很多关于添加“到您的 HTML Purifier 配置”的帖子,例如 Sonny 对这个问题的出色回答:HTMLPurifier iframe Vimeo 和 Youtube 视频
然而,尽我所能,我似乎无法确切地发现如何设置我的 HTML Purifier 配置。我实际上是在尝试按照 Sonny 的评论添加自定义过滤器,但我最接近的发现如何在我的 Drupal 7 环境中设置我的 HTML 净化器配置来自 /sites/all/modules/htmlpurifier/config/sample .php:
<?php
/**
* @file
* This file is a sample advanced PHP configuration file for the HTML Purifier
* filter module. In reality, this file would be named N.php, where N is the
* integer identifying the filter this is configuring. The configure page
* for HTML Purifier (advanced) will tell you what file to copy this to.
*
* See this URI:
*
* http://htmlpurifier.org/live/configdoc/plain.html
*
* For full information about permitted directives. The most interesting ones
* for custom configuration are ones with the 'mixed' type, as they cannot
* be configured using the webform.
但这根本没有帮助我 - 我在 HTML Purifier(高级)配置页面(在文本过滤器配置页面上?我没有看到任何东西......)上没有看到任何内容,并且在上面的 URI 也没有帮助。
编辑:非常感谢@Chris 对我最初的问题的回答。后来我发现创建filtered_html.php 文件让我无法从UI 中为过滤后的HTML 配置HTML Purifier!这应该发生吗?
在查看 HTML Purifier (Advanced) 时,我从 UI 中看到的只是“显示帮助文本”复选框。(我已经在下面添加了这个作为评论,但我想我也会修改我的问题,希望更多的人会看到这个......)