From 6b8e58ba32955774934b281a2a4bf58be6eb5358 Mon Sep 17 00:00:00 2001 From: oheil Date: Mon, 6 Mar 2023 12:24:30 +0100 Subject: [PATCH] htmlpurifier-4.15.0-lite --- .../AttrDef/HTML/ContentEditable.php | 16 ++++++++++++++++ .../ConfigSchema/schema/HTML.Forms.txt | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 webmail/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php create mode 100644 webmail/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt diff --git a/webmail/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php b/webmail/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php new file mode 100644 index 0000000..5b03d3e --- /dev/null +++ b/webmail/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php @@ -0,0 +1,16 @@ +get('HTML.Trusted')) { + $allowed = array('', 'true', 'false'); + } + + $enum = new HTMLPurifier_AttrDef_Enum($allowed); + + return $enum->validate($string, $config, $context); + } +} diff --git a/webmail/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt b/webmail/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt new file mode 100644 index 0000000..4a432d8 --- /dev/null +++ b/webmail/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt @@ -0,0 +1,11 @@ +HTML.Forms +TYPE: bool +VERSION: 4.13.0 +DEFAULT: false +--DESCRIPTION-- +

+ Whether or not to permit form elements in the user input, regardless of + %HTML.Trusted value. Please be very careful when using this functionality, as + enabling forms in untrusted documents may allow for phishing attacks. +

+--# vim: et sw=4 sts=4