1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Upgrade htmlpurifier to 4.15.0, should also resolve processwire/processwire-issues#1664

This commit is contained in:
Ryan Cramer
2023-01-13 08:54:36 -05:00
parent 11a16d5693
commit a0b91e4472
3 changed files with 488 additions and 440 deletions

View File

@@ -33,7 +33,7 @@ class MarkupHTMLPurifier extends WireData implements Module {
return array( return array(
'title' => 'HTML Purifier', 'title' => 'HTML Purifier',
'summary' => 'Front-end to the HTML Purifier library.', 'summary' => 'Front-end to the HTML Purifier library.',
'version' => 496, 'version' => 497,
'singular' => false, 'singular' => false,
'autoload' => false, 'autoload' => false,
); );
@@ -66,6 +66,7 @@ class MarkupHTMLPurifier extends WireData implements Module {
* *
*/ */
public function __construct() { public function __construct() {
parent::__construct();
require_once(dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.standalone.php'); require_once(dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.standalone.php');
$this->settings = \HTMLPurifier_Config::createDefault(); $this->settings = \HTMLPurifier_Config::createDefault();
$this->settings->autoFinalize = false; $this->settings->autoFinalize = false;

View File

@@ -4410,7 +4410,7 @@ class HTML5TreeConstructer
foreach ($token['attr'] as $attr) { foreach ($token['attr'] as $attr) {
if (!$el->hasAttribute($attr['name'])) { if (!$el->hasAttribute($attr['name'])) {
$el->setAttribute($attr['name'], $attr['value']); $el->setAttribute($attr['name'], (string)$attr['value']);
} }
} }