<?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.5.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.5.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.5.0';
/** Constant with version of HTML Purifier */
const VERSION = '4.5.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_Encoder::convertFromUTF8($html, $config, $context);
$this->context =& $context;
return $html;
}
/**
* Filters an array of HTML snippets
* @param $config Optional HTMLPurifier_Co
没有合适的资源?快使用搜索试试~ 我知道了~
PHP实例开发源码-HumHub开源社交网络应用源码 php版.zip
共13251个文件
php:11844个
xml:746个
txt:140个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 165 浏览量
2022-10-15
06:35:53
上传
评论
收藏 26.39MB ZIP 举报
温馨提示
PHP实例开发源码—HumHub开源社交网络应用源码 php版.zip PHP实例开发源码—HumHub开源社交网络应用源码 php版.zip PHP实例开发源码—HumHub开源社交网络应用源码 php版.zip
资源推荐
资源详情
资源评论
收起资源包目录
PHP实例开发源码-HumHub开源社交网络应用源码 php版.zip (13251个子文件)
generate.bat 4KB
yiic.bat 577B
yiic.bat 380B
yiic.bat 380B
build.bat 79B
CHANGELOG 145KB
install-php.cmd 646B
add-environment-variables.cmd 311B
Web.config 595B
humhub.crt 5KB
ServiceConfiguration.cscfg 469B
ServiceDefinition.csdef 919B
bootstrap.min.css 100KB
animate.min.css 54KB
font-awesome.css 26KB
jquery-ui.css 26KB
theme.css 24KB
font-awesome.min.css 21KB
datepicker.css 17KB
style.css 17KB
jquery.ui.theme.css 14KB
ie9.css 13KB
screen.css 11KB
screen.css 10KB
jquery.fancybox-1.3.1.css 8KB
main.css 6KB
datepicker.css 6KB
highlight.css 5KB
open-sans.css 5KB
bootstrap-datetimepicker.css 5KB
flatelements.css 4KB
jquery.ui.datepicker.css 3KB
jquery.Jcrop.css 3KB
form.css 3KB
jquery.treeview.css 3KB
main.css 3KB
bootstrap-wysihtml5.css 2KB
jquery.ui.button.css 2KB
ie.css 2KB
ie.css 2KB
bootstrap-tour.min.css 2KB
styles.css 2KB
jplayer.css 2KB
jquery.atwho.css 1KB
print.css 1KB
print.css 1KB
jquery.ui.dialog.css 1KB
jquery.ui.menu.css 1021B
jquery.ui.slider.css 965B
jquery.ui.resizable.css 959B
jquery.ui.core.css 903B
jquery.yiitab.css 897B
jquery.ui.tabs.css 882B
pager.css 878B
jquery.rating.css 825B
jquery.ui.spinner.css 825B
jquery.autocomplete.css 797B
jquery.Jcrop.css 793B
styles.css 724B
bootstrap3-wysiwyg5-color.css 710B
sample.css 703B
jquery.ui.accordion.css 682B
ie.css 639B
flatelements.css 552B
styles.css 508B
jquery.ui.tooltip.css 369B
ConfigForm.css 301B
jquery.ui.progressbar.css 292B
jquery.ui.autocomplete.css 269B
jquery.ui.selectable.css 246B
testdrive.db 3KB
.htaccess.dist 386B
Microsoft.Web.Deployment.dll 1.15MB
Microsoft.Web.PlatformInstaller.UI.dll 534KB
Microsoft.Web.PlatformInstaller.dll 326KB
OpenSans-LightItalic.eot 130KB
OpenSans-Italic.eot 128KB
OpenSans-SemiboldItalic.eot 128KB
OpenSans-BoldItalic.eot 125KB
OpenSans-ExtraBoldItalic.eot 121KB
OpenSans-Bold.eot 108KB
OpenSans-Semibold.eot 106KB
OpenSans-Light.eot 105KB
OpenSans-ExtraBold.eot 104KB
OpenSans-Regular.eot 104KB
fontawesome-webfont.eot 55KB
glyphicons-halflings-regular.eot 20KB
WebpiCmdLine.exe 92KB
zend-framework.flf 8KB
generate 4KB
loader_body.gif 8KB
loader.gif 8KB
jplayer-seeking.gif 4KB
treeview-default-line.gif 2KB
treeview-gray-line.gif 2KB
treeview-red-line.gif 2KB
treeview-black-line.gif 2KB
loading.gif 2KB
loading.gif 2KB
indicator.gif 2KB
共 13251 条
- 1
- 2
- 3
- 4
- 5
- 6
- 133
资源评论
- ljf8412023-04-06资源不错,内容挺好的,有一定的使用价值,值得借鉴,感谢分享。
易小侠
- 粉丝: 6476
- 资源: 9万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Vue的medical-vue医疗挂号系统设计源码
- Python解析网页.xmind
- PMV185XN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- PMV170UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于Java的长理教务管理系统设计源码
- PMV16UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 永磁同步电机-用STM32F103C8T6实现PMSM矢量控制.rar
- PMV160UP-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 3dmax超级弯曲 暴力弯曲插件
- candence原理图批量换网络的快捷操作
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功