"require": {
"chrisjean/php-ico": "1.0.*",
"erusev/parsedown": "1.7.*",
- "ezyang/htmlpurifier": "4.13.*",
+ "ezyang/htmlpurifier": "4.14.*",
"guzzlehttp/guzzle": "^7.3.0",
"guzzlehttp/psr7": "^2.2",
"laminas/laminas-diactoros": "^2.4",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fcd5171261f4dccc242c6b38d0274dc2",
+ "content-hash": "d119751db97873765f95dfcb3572783d",
"packages": [
{
"name": "chrisjean/php-ico",
},
{
"name": "ezyang/htmlpurifier",
- "version": "v4.13.0",
+ "version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
+ "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
+ "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
- "require-dev": {
- "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
- },
"type": "library",
"autoload": {
"files": [
],
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
- "source": "https://github.com/ezyang/htmlpurifier/tree/master"
+ "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0"
},
- "time": "2020-06-29T00:56:53+00:00"
+ "time": "2021-12-25T01:21:49+00:00"
},
{
"name": "guzzlehttp/guzzle",
},
{
"name": "ezyang/htmlpurifier",
- "version": "v4.13.0",
- "version_normalized": "4.13.0.0",
+ "version": "v4.14.0",
+ "version_normalized": "4.14.0.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
+ "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
+ "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
- "require-dev": {
- "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
- },
- "time": "2020-06-29T00:56:53+00:00",
+ "time": "2021-12-25T01:21:49+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
- "psr-0": {
- "HTMLPurifier": "library/"
- },
"files": [
"library/HTMLPurifier.composer.php"
],
+ "psr-0": {
+ "HTMLPurifier": "library/"
+ },
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
"keywords": [
"html"
],
+ "support": {
+ "issues": "https://github.com/ezyang/htmlpurifier/issues",
+ "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0"
+ },
"install-path": "../ezyang/htmlpurifier"
},
{
'dev_requirement' => false,
),
'ezyang/htmlpurifier' => array(
- 'pretty_version' => 'v4.13.0',
- 'version' => '4.13.0.0',
+ 'pretty_version' => 'v4.14.0',
+ 'version' => '4.14.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../ezyang/htmlpurifier',
'aliases' => array(),
- 'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
+ 'reference' => '12ab42bd6e742c70c0a52f7b82477fcd44e64b75',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
-HTML Purifier [![Build Status](https://secure.travis-ci.org/ezyang/htmlpurifier.svg?branch=master)](http://travis-ci.org/ezyang/htmlpurifier)
+HTML Purifier [![Build Status](https://github.com/ezyang/htmlpurifier/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/ezyang/htmlpurifier/actions/workflows/ci.yml)
=============
HTML Purifier is an HTML filtering solution that uses a unique combination
-4.13.0
\ No newline at end of file
+4.14.0
\ No newline at end of file
"require": {
"php": ">=5.2"
},
- "require-dev": {
- "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
- },
"autoload": {
"psr-0": { "HTMLPurifier": "library/" },
"files": ["library/HTMLPurifier.composer.php"],
* @file
* Legacy autoloader for systems lacking spl_autoload_register
*
- * Must be separate to prevent deprecation warning on PHP 7.2
*/
-function __autoload($class)
+spl_autoload_register(function($class)
{
- return HTMLPurifier_Bootstrap::autoload($class);
-}
+ return HTMLPurifier_Bootstrap::autoload($class);
+});
// vim: et sw=4 sts=4
require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php';
}
+// phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.zend_ze1_compatibility_modeRemoved
if (ini_get('zend.ze1_compatibility_mode')) {
trigger_error("HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off", E_USER_ERROR);
}
* 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.13.0
+ * @version 4.14.0
*
* @warning
* You must *not* include any other HTML Purifier files before this file,
*/
/*
- HTML Purifier 4.13.0 - Standards Compliant HTML Filtering
+ HTML Purifier 4.14.0 - Standards Compliant HTML Filtering
Copyright (C) 2006-2008 Edward Z. Yang
This library is free software; you can redistribute it and/or
* Version of HTML Purifier.
* @type string
*/
- public $version = '4.13.0';
+ public $version = '4.14.0';
/**
* Constant with version of HTML Purifier.
*/
- const VERSION = '4.13.0';
+ const VERSION = '4.14.0';
/**
* Global configuration object.
$this->info['background-repeat'] = $def->info['background-repeat'];
$this->info['background-attachment'] = $def->info['background-attachment'];
$this->info['background-position'] = $def->info['background-position'];
+ $this->info['background-size'] = $def->info['background-size'];
}
/**
$caught['repeat'] = false;
$caught['attachment'] = false;
$caught['position'] = false;
+ $caught['size'] = false;
$i = 0; // number of catches
);
$this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition();
+ $this->info['background-size'] = new HTMLPurifier_AttrDef_CSS_Composite(
+ array(
+ new HTMLPurifier_AttrDef_Enum(
+ array(
+ 'auto',
+ 'cover',
+ 'contain',
+ 'initial',
+ 'inherit',
+ )
+ ),
+ new HTMLPurifier_AttrDef_CSS_Percentage(),
+ new HTMLPurifier_AttrDef_CSS_Length()
+ )
+ );
+
$border_color =
$this->info['border-top-color'] =
$this->info['border-bottom-color'] =
}
}
- if (empty($content)) {
+ if (empty($content) && $thead === false && $tfoot === false) {
return false;
}
* HTML Purifier's version
* @type string
*/
- public $version = '4.13.0';
+ public $version = '4.14.0';
/**
* Whether or not to automatically finalize
if ($index !== false) {
$array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array();
}
- $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc();
+ $mq = $mq_fix && version_compare(PHP_VERSION, '7.4.0', '<') && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc();
$allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema);
$ret = array();
*/
public function makeLookup($list)
{
+ $args = func_get_args();
if (is_string($list)) {
- $list = func_get_args();
+ $list = $args;
}
$ret = array();
foreach ($list as $value) {
$type = "info_$type";
$e = $this;
}
- // PHP does some weird parsing when I do
- // $e->$type[$attr], so I have to assign a ref.
- $f =& $e->$type;
- $f[$attr] = $fix;
+ $e->{$type}[$attr] = $fix;
break;
case 'tag_transform':
$this->info_tag_transform[$params['element']] = $fix;
// @vspace for img ------------------------------------------------
$r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace');
- // @width for hr, td, th ------------------------------------------
+ // @width for table, hr, td, th, col ------------------------------------------
+ $r['table@width'] =
$r['td@width'] =
$r['th@width'] =
+ $r['col@width'] =
$r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width');
return $r;
'/\\b((?:[a-z][\\w\\-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'".,<>?\x{00ab}\x{00bb}\x{201c}\x{201d}\x{2018}\x{2019}]))/iu',
$token->data, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($bits === false) {
+ return;
+ }
$token = array();