From 32bdf42913518b3421986cb4d49d62ed1b04354e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 22 Aug 2020 19:50:15 +0200 Subject: composer update htmlpurifier --- SBOM.md | 2 +- composer.lock | 13 +- vendor/composer/autoload_classmap.php | 1 - vendor/composer/autoload_static.php | 1 - vendor/composer/installed.json | 15 +- vendor/ezyang/htmlpurifier/INSTALL | 341 -- vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 | 60 - vendor/ezyang/htmlpurifier/NEWS | 1224 ------ vendor/ezyang/htmlpurifier/TODO | 150 - vendor/ezyang/htmlpurifier/VERSION | 2 +- vendor/ezyang/htmlpurifier/WHATSNEW | 2 - vendor/ezyang/htmlpurifier/WYSIWYG | 20 - vendor/ezyang/htmlpurifier/composer.json | 5 +- .../extras/ConfigDoc/HTMLXSLTProcessor.php | 91 - vendor/ezyang/htmlpurifier/extras/FSTools.php | 164 - vendor/ezyang/htmlpurifier/extras/FSTools/File.php | 141 - .../extras/HTMLPurifierExtras.auto.php | 11 - .../extras/HTMLPurifierExtras.autoload-legacy.php | 15 - .../extras/HTMLPurifierExtras.autoload.php | 23 - .../htmlpurifier/extras/HTMLPurifierExtras.php | 31 - vendor/ezyang/htmlpurifier/extras/README | 32 - .../htmlpurifier/library/HTMLPurifier.includes.php | 2 +- .../ezyang/htmlpurifier/library/HTMLPurifier.php | 7 +- .../library/HTMLPurifier/AttrDef/CSS/Number.php | 8 +- .../htmlpurifier/library/HTMLPurifier/Config.php | 16 +- .../library/HTMLPurifier/ConfigSchema/schema.ser | 2 +- .../ConfigSchema/schema/HTML.Forms.txt | 11 + .../library/HTMLPurifier/HTMLModule/Forms.php | 4 + .../HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php | 1 + .../HTMLPurifier/Language/classes/en-x-test.php | 9 - .../HTMLPurifier/Language/messages/en-x-test.php | 13 - .../Language/messages/en-x-testmini.php | 14 - .../HTMLPurifier/Printer/HTMLDefinition.php | 4 +- vendor/ezyang/htmlpurifier/maintenance/.htaccess | 7 - vendor/ezyang/htmlpurifier/maintenance/PH5P.patch | 102 - vendor/ezyang/htmlpurifier/maintenance/PH5P.php | 3889 -------------------- .../htmlpurifier/maintenance/add-vimline.php | 130 - vendor/ezyang/htmlpurifier/maintenance/common.php | 25 - .../htmlpurifier/maintenance/compile-doxygen.sh | 11 - .../htmlpurifier/maintenance/config-scanner.php | 155 - .../maintenance/flush-definition-cache.php | 42 - vendor/ezyang/htmlpurifier/maintenance/flush.sh | 8 - .../maintenance/generate-entity-file.php | 75 - .../htmlpurifier/maintenance/generate-includes.php | 192 - .../maintenance/generate-ph5p-patch.php | 22 - .../maintenance/generate-schema-cache.php | 45 - .../maintenance/generate-standalone.php | 159 - .../htmlpurifier/maintenance/merge-library.php | 11 - .../maintenance/old-extract-schema.php | 71 - .../maintenance/old-remove-require-once.php | 32 - .../maintenance/old-remove-schema-def.php | 32 - .../htmlpurifier/maintenance/regenerate-docs.sh | 5 - .../maintenance/remove-trailing-whitespace.php | 37 - .../htmlpurifier/maintenance/rename-config.php | 84 - vendor/ezyang/htmlpurifier/package.php | 61 - vendor/ezyang/htmlpurifier/phpdoc.ini | 102 - vendor/ezyang/htmlpurifier/plugins/modx.txt | 112 - .../ezyang/htmlpurifier/plugins/phorum/.gitignore | 2 - .../ezyang/htmlpurifier/plugins/phorum/Changelog | 27 - vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL | 84 - vendor/ezyang/htmlpurifier/plugins/phorum/README | 45 - .../htmlpurifier/plugins/phorum/config.default.php | 58 - .../htmlpurifier/plugins/phorum/htmlpurifier.php | 316 -- vendor/ezyang/htmlpurifier/plugins/phorum/info.txt | 18 - .../htmlpurifier/plugins/phorum/init-config.php | 30 - .../htmlpurifier/plugins/phorum/migrate.bbcode.php | 31 - .../htmlpurifier/plugins/phorum/settings.php | 64 - .../htmlpurifier/plugins/phorum/settings/form.php | 95 - .../plugins/phorum/settings/migrate-sigs-form.php | 22 - .../plugins/phorum/settings/migrate-sigs.php | 79 - .../htmlpurifier/plugins/phorum/settings/save.php | 29 - .../ezyang/htmlpurifier/test-settings.sample.php | 74 - .../ezyang/htmlpurifier/test-settings.travis.php | 72 - vendor/ezyang/htmlpurifier/update-for-release | 110 - 74 files changed, 62 insertions(+), 8938 deletions(-) delete mode 100644 vendor/ezyang/htmlpurifier/INSTALL delete mode 100644 vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 delete mode 100644 vendor/ezyang/htmlpurifier/NEWS delete mode 100644 vendor/ezyang/htmlpurifier/TODO delete mode 100644 vendor/ezyang/htmlpurifier/WHATSNEW delete mode 100644 vendor/ezyang/htmlpurifier/WYSIWYG delete mode 100644 vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/FSTools.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/FSTools/File.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.auto.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.autoload-legacy.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.autoload.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.php delete mode 100644 vendor/ezyang/htmlpurifier/extras/README create mode 100644 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt delete mode 100644 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php delete mode 100644 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php delete mode 100644 vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/.htaccess delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/PH5P.patch delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/PH5P.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/add-vimline.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/common.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/compile-doxygen.sh delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/config-scanner.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/flush-definition-cache.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/flush.sh delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/generate-includes.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/generate-schema-cache.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/generate-standalone.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/merge-library.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/old-extract-schema.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/old-remove-require-once.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/regenerate-docs.sh delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php delete mode 100644 vendor/ezyang/htmlpurifier/maintenance/rename-config.php delete mode 100644 vendor/ezyang/htmlpurifier/package.php delete mode 100644 vendor/ezyang/htmlpurifier/phpdoc.ini delete mode 100644 vendor/ezyang/htmlpurifier/plugins/modx.txt delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/.gitignore delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/Changelog delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/README delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/info.txt delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/init-config.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/migrate.bbcode.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/settings.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/settings/form.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs-form.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php delete mode 100644 vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php delete mode 100644 vendor/ezyang/htmlpurifier/test-settings.sample.php delete mode 100644 vendor/ezyang/htmlpurifier/test-settings.travis.php delete mode 100644 vendor/ezyang/htmlpurifier/update-for-release diff --git a/SBOM.md b/SBOM.md index 3f1760907..5bb93ce79 100644 --- a/SBOM.md +++ b/SBOM.md @@ -6,7 +6,7 @@ |bshaffer/oauth2-server-php|1.11.1.0|MIT|https://github.com/bshaffer/oauth2-server-php.git| |commerceguys/intl|1.0.5.0|MIT|https://github.com/commerceguys/intl.git| |desandro/imagesloaded|4.1.4.0|MIT|https://github.com/desandro/imagesloaded.git| -|ezyang/htmlpurifier|4.12.0.0|LGPL-2.1-or-later|https://github.com/ezyang/htmlpurifier.git| +|ezyang/htmlpurifier|4.13.0.0|LGPL-2.1-or-later|https://github.com/ezyang/htmlpurifier.git| |league/html-to-markdown|4.9.1.0|MIT|https://github.com/thephpleague/html-to-markdown.git| |lukasreschke/id3parser|0.0.3.0|GPL|https://github.com/LukasReschke/ID3Parser.git| |michelf/php-markdown|1.9.0.0|BSD-3-Clause|https://github.com/michelf/php-markdown.git| diff --git a/composer.lock b/composer.lock index 1a9d9daed..ee5fddaf1 100644 --- a/composer.lock +++ b/composer.lock @@ -210,16 +210,16 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.12.0", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03" + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", "shasum": "" }, "require": { @@ -235,6 +235,9 @@ }, "files": [ "library/HTMLPurifier.composer.php" + ], + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -253,7 +256,7 @@ "keywords": [ "html" ], - "time": "2019-10-28T03:44:26+00:00" + "time": "2020-06-29T00:56:53+00:00" }, { "name": "league/html-to-markdown", diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 73bf8630c..54a5ea11d 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -193,7 +193,6 @@ return array( 'HTMLPurifier_Injector_SafeObject' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php', 'HTMLPurifier_Language' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php', 'HTMLPurifier_LanguageFactory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php', - 'HTMLPurifier_Language_en_x_test' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php', 'HTMLPurifier_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php', 'HTMLPurifier_Lexer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php', 'HTMLPurifier_Lexer_DOMLex' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index da5aa06ad..fd44b4266 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -361,7 +361,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'HTMLPurifier_Injector_SafeObject' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php', 'HTMLPurifier_Language' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php', 'HTMLPurifier_LanguageFactory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php', - 'HTMLPurifier_Language_en_x_test' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php', 'HTMLPurifier_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php', 'HTMLPurifier_Lexer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php', 'HTMLPurifier_Lexer_DOMLex' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2d2a3f48a..5de750e76 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -211,17 +211,17 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.12.0", - "version_normalized": "4.12.0.0", + "version": "v4.13.0", + "version_normalized": "4.13.0.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03" + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", "shasum": "" }, "require": { @@ -230,7 +230,7 @@ "require-dev": { "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" }, - "time": "2019-10-28T03:44:26+00:00", + "time": "2020-06-29T00:56:53+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -239,6 +239,9 @@ }, "files": [ "library/HTMLPurifier.composer.php" + ], + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" ] }, "notification-url": "https://packagist.org/downloads/", diff --git a/vendor/ezyang/htmlpurifier/INSTALL b/vendor/ezyang/htmlpurifier/INSTALL deleted file mode 100644 index 5f6a965f3..000000000 --- a/vendor/ezyang/htmlpurifier/INSTALL +++ /dev/null @@ -1,341 +0,0 @@ - -Install - How to install HTML Purifier - -HTML Purifier is designed to run out of the box, so actually using the -library is extremely easy. (Although... if you were looking for a -step-by-step installation GUI, you've downloaded the wrong software!) - -While the impatient can get going immediately with some of the sample -code at the bottom of this library, it's well worth reading this entire -document--most of the other documentation assumes that you are familiar -with these contents. - - ---------------------------------------------------------------------------- -1. Compatibility - -HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.3 -and up. It has no core dependencies with other libraries. - -These optional extensions can enhance the capabilities of HTML Purifier: - - * iconv : Converts text to and from non-UTF-8 encodings - * bcmath : Used for unit conversion and imagecrash protection - * tidy : Used for pretty-printing HTML - -These optional libraries can enhance the capabilities of HTML Purifier: - - * CSSTidy : Clean CSS stylesheets using %Core.ExtractStyleBlocks - Note: You should use the modernized fork of CSSTidy available - at https://github.com/Cerdic/CSSTidy - * Net_IDNA2 (PEAR) : IRI support using %Core.EnableIDNA - Note: This is not necessary for PHP 5.3 or later - ---------------------------------------------------------------------------- -2. Reconnaissance - -A big plus of HTML Purifier is its inerrant support of standards, so -your web-pages should be standards-compliant. (They should also use -semantic markup, but that's another issue altogether, one HTML Purifier -cannot fix without reading your mind.) - -HTML Purifier can process these doctypes: - -* XHTML 1.0 Transitional (default) -* XHTML 1.0 Strict -* HTML 4.01 Transitional -* HTML 4.01 Strict -* XHTML 1.1 - -...and these character encodings: - -* UTF-8 (default) -* Any encoding iconv supports (with crippled internationalization support) - -These defaults reflect what my choices would be if I were authoring an -HTML document, however, what you choose depends on the nature of your -codebase. If you don't know what doctype you are using, you can determine -the doctype from this identifier at the top of your source code: - - - -...and the character encoding from this code: - - - -If the character encoding declaration is missing, STOP NOW, and -read 'docs/enduser-utf8.html' (web accessible at -http://htmlpurifier.org/docs/enduser-utf8.html). In fact, even if it is -present, read this document anyway, as many websites specify their -document's character encoding incorrectly. - - ---------------------------------------------------------------------------- -3. Including the library - -The procedure is quite simple: - - require_once '/path/to/library/HTMLPurifier.auto.php'; - -This will setup an autoloader, so the library's files are only included -when you use them. - -Only the contents in the library/ folder are necessary, so you can remove -everything else when using HTML Purifier in a production environment. - -If you installed HTML Purifier via PEAR, all you need to do is: - - require_once 'HTMLPurifier.auto.php'; - -Please note that the usual PEAR practice of including just the classes you -want will not work with HTML Purifier's autoloading scheme. - -Advanced users, read on; other users can skip to section 4. - -Autoload compatibility ----------------------- - - HTML Purifier attempts to be as smart as possible when registering an - autoloader, but there are some cases where you will need to change - your own code to accomodate HTML Purifier. These are those cases: - - AN __autoload FUNCTION IS DECLARED AFTER OUR AUTOLOADER IS REGISTERED - spl_autoload_register() has the curious behavior of disabling - the existing __autoload() handler. Users need to explicitly - spl_autoload_register('__autoload'). Because we use SPL when it - is available, __autoload() will ALWAYS be disabled. If __autoload() - is declared before HTML Purifier is loaded, this is not a problem: - HTML Purifier will register the function for you. But if it is - declared afterwards, it will mysteriously not work. This - snippet of code (after your autoloader is defined) will fix it: - - spl_autoload_register('__autoload') - - -For better performance ----------------------- - - Opcode caches, which greatly speed up PHP initialization for scripts - with large amounts of code (HTML Purifier included), don't like - autoloaders. We offer an include file that includes all of HTML Purifier's - files in one go in an opcode cache friendly manner: - - // If /path/to/library isn't already in your include path, uncomment - // the below line: - // require '/path/to/library/HTMLPurifier.path.php'; - - require 'HTMLPurifier.includes.php'; - - Optional components still need to be included--you'll know if you try to - use a feature and you get a class doesn't exists error! The autoloader - can be used in conjunction with this approach to catch classes that are - missing. Simply add this afterwards: - - require 'HTMLPurifier.autoload.php'; - -Standalone version ------------------- - - HTML Purifier has a standalone distribution; you can also generate - a standalone file from the full version by running the script - maintenance/generate-standalone.php . The standalone version has the - benefit of having most of its code in one file, so parsing is much - faster and the library is easier to manage. - - If HTMLPurifier.standalone.php exists in the library directory, you - can use it like this: - - require '/path/to/HTMLPurifier.standalone.php'; - - This is equivalent to including HTMLPurifier.includes.php, except that - the contents of standalone/ will be added to your path. To override this - behavior, specify a new HTMLPURIFIER_PREFIX where standalone files can - be found (usually, this will be one directory up, the "true" library - directory in full distributions). Don't forget to set your path too! - - The autoloader can be added to the end to ensure the classes are - loaded when necessary; otherwise you can manually include them. - To use the autoloader, use this: - - require 'HTMLPurifier.autoload.php'; - -For advanced users ------------------- - - HTMLPurifier.auto.php performs a number of operations that can be done - individually. These are: - - HTMLPurifier.path.php - Puts /path/to/library in the include path. For high performance, - this should be done in php.ini. - - HTMLPurifier.autoload.php - Registers our autoload handler HTMLPurifier_Bootstrap::autoload($class). - - You can do these operations by yourself, if you like. - - ---------------------------------------------------------------------------- -4. Configuration - -HTML Purifier is designed to run out-of-the-box, but occasionally HTML -Purifier needs to be told what to do. If you answer no to any of these -questions, read on; otherwise, you can skip to the next section (or, if you're -into configuring things just for the heck of it, skip to 4.3). - -* Am I using UTF-8? -* Am I using XHTML 1.0 Transitional? - -If you answered no to any of these questions, instantiate a configuration -object and read on: - - $config = HTMLPurifier_Config::createDefault(); - - -4.1. Setting a different character encoding - -You really shouldn't use any other encoding except UTF-8, especially if you -plan to support multilingual websites (read section three for more details). -However, switching to UTF-8 is not always immediately feasible, so we can -adapt. - -HTML Purifier uses iconv to support other character encodings, as such, -any encoding that iconv supports -HTML Purifier supports with this code: - - $config->set('Core.Encoding', /* put your encoding here */); - -An example usage for Latin-1 websites (the most common encoding for English -websites): - - $config->set('Core.Encoding', 'ISO-8859-1'); - -Note that HTML Purifier's support for non-Unicode encodings is crippled by the -fact that any character not supported by that encoding will be silently -dropped, EVEN if it is ampersand escaped. If you want to work around -this, you are welcome to read docs/enduser-utf8.html for a fix, -but please be cognizant of the issues the "solution" creates (for this -reason, I do not include the solution in this document). - - -4.2. Setting a different doctype - -For those of you using HTML 4.01 Transitional, you can disable -XHTML output like this: - - $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); - -Other supported doctypes include: - - * HTML 4.01 Strict - * HTML 4.01 Transitional - * XHTML 1.0 Strict - * XHTML 1.0 Transitional - * XHTML 1.1 - - -4.3. Other settings - -There are more configuration directives which can be read about -here: They're a bit boring, -but they can help out for those of you who like to exert maximum control over -your code. Some of the more interesting ones are configurable at the -demo and are well worth looking into -for your own system. - -For example, you can fine tune allowed elements and attributes, convert -relative URLs to absolute ones, and even autoparagraph input text! These -are, respectively, %HTML.Allowed, %URI.MakeAbsolute and %URI.Base, and -%AutoFormat.AutoParagraph. The %Namespace.Directive naming convention -translates to: - - $config->set('Namespace.Directive', $value); - -E.g. - - $config->set('HTML.Allowed', 'p,b,a[href],i'); - $config->set('URI.Base', 'http://www.example.com'); - $config->set('URI.MakeAbsolute', true); - $config->set('AutoFormat.AutoParagraph', true); - - ---------------------------------------------------------------------------- -5. Caching - -HTML Purifier generates some cache files (generally one or two) to speed up -its execution. For maximum performance, make sure that -library/HTMLPurifier/DefinitionCache/Serializer is writeable by the webserver. - -If you are in the library/ folder of HTML Purifier, you can set the -appropriate permissions using: - - chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer - -If the above command doesn't work, you may need to assign write permissions -to group: - - chmod -R 0775 HTMLPurifier/DefinitionCache/Serializer - -You can also chmod files via your FTP client; this option -is usually accessible by right clicking the corresponding directory and -then selecting "chmod" or "file permissions". - -Starting with 2.0.1, HTML Purifier will generate friendly error messages -that will tell you exactly what you have to chmod the directory to, if in doubt, -follow its advice. - -If you are unable or unwilling to give write permissions to the cache -directory, you can either disable the cache (and suffer a performance -hit): - - $config->set('Core.DefinitionCache', null); - -Or move the cache directory somewhere else (no trailing slash): - - $config->set('Cache.SerializerPath', '/home/user/absolute/path'); - - ---------------------------------------------------------------------------- -6. Using the code - -The interface is mind-numbingly simple: - - $purifier = new HTMLPurifier($config); - $clean_html = $purifier->purify( $dirty_html ); - -That's it! For more examples, check out docs/examples/ (they aren't very -different though). Also, docs/enduser-slow.html gives advice on what to -do if HTML Purifier is slowing down your application. - - ---------------------------------------------------------------------------- -7. Quick install - -First, make sure library/HTMLPurifier/DefinitionCache/Serializer is -writable by the webserver (see Section 5: Caching above for details). -If your website is in UTF-8 and XHTML Transitional, use this code: - -purify($dirty_html); -?> - -If your website is in a different encoding or doctype, use this code: - -set('Core.Encoding', 'ISO-8859-1'); // replace with your encoding - $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); // replace with your doctype - $purifier = new HTMLPurifier($config); - - $clean_html = $purifier->purify($dirty_html); -?> - - vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 b/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 deleted file mode 100644 index 629387e2e..000000000 --- a/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 +++ /dev/null @@ -1,60 +0,0 @@ - -Installation - Comment installer HTML Purifier - -Attention : Ce document est encodé en UTF-8, si les lettres avec des accents -ne s'affichent pas, prenez un meilleur éditeur de texte. - -L'installation de HTML Purifier est très simple, parce qu'il n'a pas besoin -de configuration. Pour les utilisateurs impatients, le code se trouve dans le -pied de page, mais je recommande de lire le document. - -1. Compatibilité - -HTML Purifier fonctionne avec PHP 5. PHP 5.3 est la dernière version testée. -Il ne dépend pas d'autres librairies. - -Les extensions optionnelles sont iconv (généralement déjà installée) et tidy -(répendue aussi). Si vous utilisez UTF-8 et que vous ne voulez pas l'indentation, -vous pouvez utiliser HTML Purifier sans ces extensions. - - -2. Inclure la librairie - -Quand vous devez l'utilisez, incluez le : - - require_once('/path/to/library/HTMLPurifier.auto.php'); - -Ne pas l'inclure si ce n'est pas nécessaire, car HTML Purifier est lourd. - -HTML Purifier utilise "autoload". Si vous avez défini la fonction __autoload, -vous devez ajouter cette fonction : - - spl_autoload_register('__autoload') - -Plus d'informations dans le document "INSTALL". - -3. Installation rapide - -Si votre site Web est en UTF-8 et XHTML Transitional, utilisez : - -purify($html_a_purifier); -?> - -Sinon, utilisez : - -set('Core', 'Encoding', 'ISO-8859-1'); //Remplacez par votre - encodage - $config->set('Core', 'XHTML', true); //Remplacer par false si HTML 4.01 - $purificateur = new HTMLPurifier($config); - $html_propre = $purificateur->purify($html_a_purifier); -?> - - - vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/NEWS b/vendor/ezyang/htmlpurifier/NEWS deleted file mode 100644 index 352835012..000000000 --- a/vendor/ezyang/htmlpurifier/NEWS +++ /dev/null @@ -1,1224 +0,0 @@ -NEWS ( CHANGELOG and HISTORY ) HTMLPurifier -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - -= KEY ==================== - # Breaks back-compat - ! Feature - - Bugfix - + Sub-comment - . Internal change -========================== - -4.12.0, released 2019-10-27 -! PHP 7.4 is supported, thank you Witold Wasiczko, Mateuz Turcza and - Edi Modrić -- PHPDocs for HTMLModule::addElement() and Bool attr are fixed (thanks - Mateusz) - -4.11.0, released 2019-07-14 -# SafeScripting now matches case-sensitively against its whitelist (previously it was - case-insensitive.) Thanks Dimitri Gritsajuk - for reporting. -! New directive %Core.AllowParseManyTags which allows parsing of many nested tags. - Thanks M. Suzuki for contributing the patch. -! purifyArray now supports multidimensional arrays. Thanks - Sandro Miguel Marques for contributing this patch. -! initial and inherit settings available for width, height, and the min-/max- - versions thereof. Thanks Michael Kliewe for contributing - this patch. -! More color names are supported. Thanks Daijobou for contributing. -- Compatibility fixes for PHP 7.3, including new CI for PHP 7.3 - (thank you Lukas Neumann ) and removal of - reserved words in our constants (thanks Darko Hrgovic -- Compatibility fixes for HHVM. Thanks Mateusz Turcza for contributing - this fix. -- HTML Purifier now never defines __autoload, fixing #196. Thanks - Michael Kliewe for reporting. -- In some situations, Config.php would report an undefined index: class - error; this has been fixed. Thanks DiLong Fa for contributing - this fix. -- We no longer produce '; - - $frm->show(); -} - -function phorum_htmlpurifier_show_config_info() -{ - global $PHORUM; - - // update mod_htmlpurifier for housekeeping - phorum_htmlpurifier_commit_settings(); - - // politely tell user how to edit settings manually -?> -
How to edit settings for HTML Purifier module
-

- A config.php file exists in your mods/htmlpurifier/ - directory. This file contains your custom configuration: in order to - change it, please navigate to that file and edit it accordingly. - You can also set $GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'] - or $GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message'] -

-

- To use the web interface, delete config.php (or rename it to - config.php.bak). -

-

- Warning: Changing HTML Purifier's configuration will invalidate - the cache. Expect to see a flurry of database activity after you change - any of these settings. -

-hidden("module", "modsettings"); - $frm->hidden("mod", "htmlpurifier"); - $frm->hidden("migrate-sigs", "1"); - $frm->addbreak("Migrate user signatures to HTML"); - $frm->addMessage('This operation will migrate your users signatures - to HTML. This process is irreversible and must only be performed once. - Type in yes in the confirmation field to migrate.'); - if (!file_exists(dirname(__FILE__) . '/../migrate.php')) { - $frm->addMessage('Migration file does not exist, cannot migrate signatures. - Please check migrate.bbcode.php on how to create an appropriate file.'); - } else { - $frm->addrow('Confirm:', $frm->text_box("confirmation", "")); - } - $frm->show(); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php deleted file mode 100644 index 5ea9cd0b8..000000000 --- a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php +++ /dev/null @@ -1,79 +0,0 @@ -$PHORUM["mod_htmlpurifier"])); - $offset = 1; - } elseif (!empty($_GET['migrate-sigs']) && $PHORUM['mod_htmlpurifier']['migrate-sigs']) { - $offset = (int) $_GET['migrate-sigs']; - } - return $offset; -} - -function phorum_htmlpurifier_migrate_sigs($offset) -{ - global $PHORUM; - - if(!$offset) return; // bail out quick if $offset == 0 - - // theoretically, we could get rid of this multi-request - // doo-hickery if safe mode is off - @set_time_limit(0); // attempt to let this run - $increment = $PHORUM['mod_htmlpurifier']['migrate-sigs-increment']; - - require_once(dirname(__FILE__) . '/../migrate.php'); - // migrate signatures - // do this in batches so we don't run out of time/space - $end = $offset + $increment; - $user_ids = array(); - for ($i = $offset; $i < $end; $i++) { - $user_ids[] = $i; - } - $userinfos = phorum_db_user_get_fields($user_ids, 'signature'); - foreach ($userinfos as $i => $user) { - if (empty($user['signature'])) continue; - $sig = $user['signature']; - // perform standard Phorum processing on the sig - $sig = str_replace(array("&","<",">"), array("&","<",">"), $sig); - $sig = preg_replace("/<((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+?)>/i", "$1", $sig); - // prepare fake data to pass to migration function - $fake_data = array(array("author"=>"", "email"=>"", "subject"=>"", 'body' => $sig)); - list($fake_message) = phorum_htmlpurifier_migrate($fake_data); - $user['signature'] = $fake_message['body']; - if (!phorum_api_user_save($user)) { - exit('Error while saving user data'); - } - } - unset($userinfos); // free up memory - - // query for highest ID in database - $type = $PHORUM['DBCONFIG']['type']; - $sql = "select MAX(user_id) from {$PHORUM['user_table']}"; - $row = phorum_db_interact(DB_RETURN_ROW, $sql); - $top_id = (int) $row[0]; - - $offset += $increment; - if ($offset > $top_id) { // test for end condition - echo 'Migration finished'; - $PHORUM['mod_htmlpurifier']['migrate-sigs'] = false; - phorum_htmlpurifier_commit_settings(); - return true; - } - $host = $_SERVER['HTTP_HOST']; - $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); - $extra = 'admin.php?module=modsettings&mod=htmlpurifier&migrate-sigs=' . $offset; - // relies on output buffering to work - header("Location: http://$host$uri/$extra"); - exit; - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php deleted file mode 100644 index 2aefaf83a..000000000 --- a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php +++ /dev/null @@ -1,29 +0,0 @@ -mods/htmlpurifier/config.php already exists. To change - settings, edit that file. To use the web form, delete that file.
"; - } else { - $config = phorum_htmlpurifier_get_config(true); - if (!isset($_POST['reset'])) $config->mergeArrayFromForm($_POST, 'config', $PHORUM['mod_htmlpurifier']['directives']); - $PHORUM['mod_htmlpurifier']['config'] = $config->getAll(); - } - $PHORUM['mod_htmlpurifier']['wysiwyg'] = !empty($_POST['wysiwyg']); - $PHORUM['mod_htmlpurifier']['suppress_message'] = !empty($_POST['suppress_message']); - if(!phorum_htmlpurifier_commit_settings()){ - $error="Database error while updating settings."; - } else { - echo "Settings Updated
"; - } -} - -function phorum_htmlpurifier_commit_settings() -{ - global $PHORUM; - return phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"])); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/test-settings.sample.php b/vendor/ezyang/htmlpurifier/test-settings.sample.php deleted file mode 100644 index 480b66279..000000000 --- a/vendor/ezyang/htmlpurifier/test-settings.sample.php +++ /dev/null @@ -1,74 +0,0 @@ - 1) { - echo 'More than one release declaration in NEWS replaced' . PHP_EOL; - exit; - } - file_put_contents('NEWS', $news_c); -} - -// ...in Doxyfile -$doxyfile_c = preg_replace( - '/(?<=PROJECT_NUMBER {9}= )[^\s]+/m', // brittle - $version, - file_get_contents('Doxyfile'), - 1, $c -); -if (!$c) { - echo 'Could not update Doxyfile, missing PROJECT_NUMBER.' . PHP_EOL; - exit; -} -file_put_contents('Doxyfile', $doxyfile_c); - -// ...in HTMLPurifier.php -$htmlpurifier_c = file_get_contents('library/HTMLPurifier.php'); -$htmlpurifier_c = preg_replace( - '/HTML Purifier .+? - /', - "HTML Purifier $version - ", - $htmlpurifier_c, - 1, $c -); -if (!$c) { - echo 'Could not update HTMLPurifier.php, missing HTML Purifier [version] header.' . PHP_EOL; - exit; -} -$htmlpurifier_c = preg_replace( - '/public \$version = \'.+?\';/', - "public \$version = '$version';", - $htmlpurifier_c, - 1, $c -); -if (!$c) { - echo 'Could not update HTMLPurifier.php, missing public $version.' . PHP_EOL; - exit; -} -$htmlpurifier_c = preg_replace( - '/const VERSION = \'.+?\';/', - "const VERSION = '$version';", - $htmlpurifier_c, - 1, $c -); -if (!$c) { - echo 'Could not update HTMLPurifier.php, missing const $version.' . PHP_EOL; - exit; -} -file_put_contents('library/HTMLPurifier.php', $htmlpurifier_c); - -$config_c = file_get_contents('library/HTMLPurifier/Config.php'); -$config_c = preg_replace( - '/public \$version = \'.+?\';/', - "public \$version = '$version';", - $config_c, - 1, $c -); -if (!$c) { - echo 'Could not update Config.php, missing public $version.' . PHP_EOL; - exit; -} -file_put_contents('library/HTMLPurifier/Config.php', $config_c); - -passthru('maintenance/flush.sh'); - -if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL; -else echo "Numbers updated to dev, no other modifications necessary!"; - -// vim: et sw=4 sts=4 -- cgit v1.2.3