* Run CSSTidy tests on CI
* update dirname
* use compopser instead of git clone
* use composer
* use test-settings.sample.php
* enable ext-intl
* disable Net_IDNA2
* Define HTMLPurifier_AttrTransform_SafeParam::$wmode
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$cache
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$mock
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_DefinitionCache_DecoratorHarness::$def
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_EntityParserTest::$_entity_lookup
This fixes a PHP 8.2 deprecation.
YAML will try to interpret numeric values as numbers, leading to `8.0` being
interpreted as `8` instead of `'8.0'`.
This doesn't result in a functional change, but cleans up the output of the
jobs a little (e.g. in the title line).
* Define HTMLPurifier_Lexer::$_entity_parser property
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_URIFilterHarness::$filter property
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_AttrTransform_NameSync::$idDef property
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_AttrTransform_NameSyncTest::$accumulator property
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_AttrValidator_ErrorsTest::$language property
This fixes a PHP 8.2 deprecation.
* Define HTMLPurifier_ChildDef_List::$whitespace property
This fixes a PHP 8.2 deprecation.
* Do not modify incoming tokens in RemoveSpansWithoutAttributes
Previously the undefined property `->markForDeletion` was added to the incoming
tokens. This causes a deprecation in PHP 8.2. Fix this by storing to-be-deleted
tokens inside SplObjectStorage. In PHP 8 a WeakMap would be preferable, as that
prevents leaks if `handleEnd` is never called for the token.
* Remove unnecessary reference assigment
Proposed code is PHP5 and PHP7 compatible. PHP5 interpreted `$e->$type[$attr]` as `$e->{$type[$attr]}`, but the expected behavior based on workaround is consistent with PHP7 interpretation: `($e->$type)[$attr]`. By using curly braces `{$e->$type}[$attr]` there is a forced interpretation order working for both versions.
Details can be found on https://www.php.net/manual/en/migration70.incompatible.php (section "Changes to the handling of indirect variables, properties, and methods")
* Fix syntax
Use correct syntax for indirect variable evaluation order change.
This function has been DEPRECATED as of PHP 7.4.0. Relying on this function is highly discouraged. It is basically useless as of PHP 5.4 because it will always return false, so for modern applications it can be safely removed. But as this library still supports PHP 5.2 — according to the constraints in composer.json — I added a version check to prevent this method from being called (and trigger a notice) on PHP >=7.4.
See: https://www.php.net/manual/en/function.get-magic-quotes-gpc.php
The %HTML.Forms directive enables Forms module regardless of the %HTML.Trusted
value. This adds support for form elements without enabling other unsafe
modules, such as Scripts, Iframe or Object.
To achieve the same effect without this directive one has to explicitly list
all enabled modules in %HTML.AllowedModules, and any not listed will be
removed. This however is not very convenient, as the allowed modules may vary
between doctypes.
Resolves#213.
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).
Part of https://tracker.moodle.org/browse/MDL-67115