【发布时间】:2015-05-14 21:48:59
【问题描述】:
我在各种网站上看到了很多关于添加“到您的 HTML Purifier 配置”的帖子,例如 Sonny 对这个问题的出色回答:HTMLPurifier iframe Vimeo and Youtube video
但是,尽我所能,我似乎无法确切地发现如何设置我的 HTML Purifier 配置。我实际上是在尝试添加自定义过滤器a la Sonny 的评论,但我最接近的发现如何在我的 Drupal 7 环境中设置我的 HTML 净化器配置来自 /sites/all/模块/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(高级)时,我从 UI 中看到的只是“显示帮助文本”复选框。 (我已经在下面添加了这个作为评论,但我想我也会修改我的问题,希望更多的人会看到这个......)
【问题讨论】:
标签: drupal-7 htmlpurifier