<?php
/**
* @file
* This file was auto-generated by generate-includes.php and includes all of
* the core files required by HTML Purifier. Use this if performance is a
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
* FILE, changes will be overwritten the next time the script is run.
*
* @version 4.4.0
*
* @warning
* You must *not* include any other HTML Purifier files before this file,
* because 'require' not 'require_once' is used.
*
* @warning
* This file requires that the include path contains the HTML Purifier
* library directory; this is not auto-set.
*/
/*! @mainpage
*
* HTML Purifier is an HTML filter that will take an arbitrary snippet of
* HTML and rigorously test, validate and filter it into a version that
* is safe for output onto webpages. It achieves this by:
*
* -# Lexing (parsing into tokens) the document,
* -# Executing various strategies on the tokens:
* -# Removing all elements not in the whitelist,
* -# Making the tokens well-formed,
* -# Fixing the nesting of the nodes, and
* -# Validating attributes of the nodes; and
* -# Generating HTML from the purified tokens.
*
* However, most users will only need to interface with the HTMLPurifier
* and HTMLPurifier_Config.
*/
/*
HTML Purifier 4.4.0 - Standards Compliant HTML Filtering
Copyright (C) 2006-2008 Edward Z. Yang
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
*
* @note There are several points in which configuration can be specified
* for HTML Purifier. The precedence of these (from lowest to
* highest) is as follows:
* -# Instance: new HTMLPurifier($config)
* -# Invocation: purify($html, $config)
* These configurations are entirely independent of each other and
* are *not* merged (this behavior may change in the future).
*
* @todo We need an easier way to inject strategies using the configuration
* object.
*/
class HTMLPurifier
{
/** Version of HTML Purifier */
public $version = '4.4.0';
/** Constant with version of HTML Purifier */
const VERSION = '4.4.0';
/** Global configuration object */
public $config;
/** Array of extra HTMLPurifier_Filter objects to run on HTML, for backwards compatibility */
private $filters = array();
/** Single instance of HTML Purifier */
private static $instance;
protected $strategy, $generator;
/**
* Resultant HTMLPurifier_Context of last run purification. Is an array
* of contexts if the last called method was purifyArray().
*/
public $context;
/**
* Initializes the purifier.
* @param $config Optional HTMLPurifier_Config object for all instances of
* the purifier, if omitted, a default configuration is
* supplied (which can be overridden on a per-use basis).
* The parameter can also be any type that
* HTMLPurifier_Config::create() supports.
*/
public function __construct($config = null) {
$this->config = HTMLPurifier_Config::create($config);
$this->strategy = new HTMLPurifier_Strategy_Core();
}
/**
* Adds a filter to process the output. First come first serve
* @param $filter HTMLPurifier_Filter object
*/
public function addFilter($filter) {
trigger_error('HTMLPurifier->addFilter() is deprecated, use configuration directives in the Filter namespace or Filter.Custom', E_USER_WARNING);
$this->filters[] = $filter;
}
/**
* Filters an HTML snippet/document to be XSS-free and standards-compliant.
*
* @param $html String of HTML to purify
* @param $config HTMLPurifier_Config object for this operation, if omitted,
* defaults to the config object specified during this
* object's construction. The parameter can also be any type
* that HTMLPurifier_Config::create() supports.
* @return Purified HTML
*/
public function purify($html, $config = null) {
// :TODO: make the config merge in, instead of replace
$config = $config ? HTMLPurifier_Config::create($config) : $this->config;
// implementation is partially environment dependant, partially
// configuration dependant
$lexer = HTMLPurifier_Lexer::create($config);
$context = new HTMLPurifier_Context();
// setup HTML generator
$this->generator = new HTMLPurifier_Generator($config, $context);
$context->register('Generator', $this->generator);
// set up global context variables
if ($config->get('Core.CollectErrors')) {
// may get moved out if other facilities use it
$language_factory = HTMLPurifier_LanguageFactory::instance();
$language = $language_factory->create($config, $context);
$context->register('Locale', $language);
$error_collector = new HTMLPurifier_ErrorCollector($context);
$context->register('ErrorCollector', $error_collector);
}
// setup id_accumulator context, necessary due to the fact that
// AttrValidator can be called from many places
$id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context);
$context->register('IDAccumulator', $id_accumulator);
$html = HTMLPurifier_Encoder::convertToUTF8($html, $config, $context);
// setup filters
$filter_flags = $config->getBatch('Filter');
$custom_filters = $filter_flags['Custom'];
unset($filter_flags['Custom']);
$filters = array();
foreach ($filter_flags as $filter => $flag) {
if (!$flag) continue;
if (strpos($filter, '.') !== false) continue;
$class = "HTMLPurifier_Filter_$filter";
$filters[] = new $class;
}
foreach ($custom_filters as $filter) {
// maybe "HTMLPurifier_Filter_$filter", but be consistent with AutoFormat
$filters[] = $filter;
}
$filters = array_merge($filters, $this->filters);
// maybe prepare(), but later
for ($i = 0, $filter_size = count($filters); $i < $filter_size; $i++) {
$html = $filters[$i]->preFilter($html, $config, $context);
}
// purified HTML
$html =
$this->generator->generateFromTokens(
// list of tokens
$this->strategy->execute(
// list of un-purified tokens
$lexer->tokenizeHTML(
// un-purified HTML
$html, $config, $context
),
$config, $context
)
);
for ($i = $filter_size - 1; $i >= 0; $i--) {
$html = $filters[$i]->postFilter($html, $config, $context);
}
$html = HTMLPurifier_Encod
没有合适的资源?快使用搜索试试~ 我知道了~
Yii PHP框架For BAE 【BAE提供了Yii PHP框架,用于开发大型Web应用。】
共1973个文件
php:1598个
txt:132个
css:44个
3星 · 超过75%的资源 需积分: 10 14 下载量 195 浏览量
2013-03-18
13:49:10
上传
评论 1
收藏 6.6MB ZIP 举报
温馨提示
Yii是一个高性能的PHP5的web应用程序开发框架。通过一个简单的命令行工具 yiic 可以快速创建一个web应用程序的代码框架,开发者可以在生成的代码框架基础上添加业务逻辑,以快速完成应用程序的开发。 BAE提供了Yii PHP框架,用于开发大型Web应用。 版本:Bae_yii1.1.10
资源推荐
资源详情
资源评论
收起资源包目录
Yii PHP框架For BAE 【BAE提供了Yii PHP框架,用于开发大型Web应用。】 (1973个子文件)
.actionScriptProperties 2KB
generate.bat 5KB
yiic.bat 641B
yiic.bat 380B
yiic.bat 378B
CHANGELOG 101KB
appdemo.conf 593B
jquery-ui.css 24KB
jquery.ui.theme.css 14KB
screen.css 11KB
screen.css 11KB
screen.css 10KB
jquery.fancybox-1.3.1.css 8KB
main.css 6KB
highlight.css 6KB
jquery.ui.datepicker.css 3KB
main.css 3KB
jquery.treeview.css 3KB
form.css 3KB
form.css 3KB
main.css 3KB
jquery.ui.button.css 2KB
ie.css 2KB
ie.css 2KB
ie.css 2KB
styles.css 1KB
print.css 1KB
print.css 1KB
print.css 1KB
jquery.ui.dialog.css 1KB
main.css 1KB
jquery.ui.resizable.css 1KB
jquery.ui.slider.css 1KB
jquery.ui.tabs.css 1KB
pager.css 960B
jquery.ui.core.css 960B
jquery.ui.accordion.css 947B
jquery.yiitab.css 897B
jquery.rating.css 836B
jquery.autocomplete.css 797B
sample.css 760B
jquery.ui.autocomplete.css 733B
styles.css 724B
jquery.ui.base.css 691B
styles.css 508B
history.css 371B
history.css 371B
jquery.ui.progressbar.css 363B
jquery.ui.selectable.css 315B
ConfigForm.css 311B
jquery.ui.all.css 297B
blog.db 9KB
blog-test.db 9KB
testdrive.db 3KB
phonebook.db 2KB
yii.diff 30KB
empty 0B
empty 0B
.flexProperties 109B
generate 4KB
treeview-default-line.gif 2KB
treeview-gray-line.gif 2KB
treeview-black-line.gif 2KB
treeview-red-line.gif 2KB
loading.gif 2KB
loading.gif 2KB
indicator.gif 2KB
treeview-famfamfam.gif 1KB
treeview-red.gif 1KB
treeview-gray.gif 1KB
treeview-default.gif 1KB
treeview-black.gif 1KB
ajax-loader.gif 847B
plus.gif 841B
minus.gif 837B
star.gif 815B
treeview-famfamfam-line.gif 807B
delete.gif 752B
bg.gif 243B
bg.gif 243B
bg.gif 243B
file.gif 110B
folder.gif 106B
folder-closed.gif 105B
down.gif 55B
down.gif 55B
up.gif 54B
up.gif 54B
blank.gif 43B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
.htaccess 15B
index.template.html 4KB
共 1973 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- kiter872013-06-13百度提供的有。LZ不厚道还扣这么多分。分享资源3分2分还差不多。还搞这么高。
- 大鹏金2015-08-20好用的框架.
a0311223
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功