Skip to content
Extraits de code Groupes Projets
Valider dce4db05 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

SVG Sanitizer en version 0.14.1

parent 0b527728
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -8,6 +8,9 @@
"email": "daryll@enshrined.co.uk"
}
],
"scripts": {
"test": "phpunit --no-coverage"
},
"autoload": {
"psr-4": {
"enshrined\\svgSanitize\\": "src"
......@@ -18,13 +21,13 @@
"enshrined\\svgSanitize\\Tests\\": "tests"
}
},
"minimum-stability": "stable",
"require": {
"ext-dom": "*",
"ext-libxml": "*"
"ext-libxml": "*",
"php": "^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^6",
"phpunit/phpunit": "^6.5 || ^8.5",
"codeclimate/php-test-reporter": "^0.1.2"
}
}
......@@ -208,8 +208,6 @@ class Sanitizer
return false;
}
$this->removeDoctype();
// Pre-process all identified elements
$xPath = new XPath($this->xmlDocument);
$this->elementReferenceResolver = new Resolver($xPath, $this->useNestingLimit);
......@@ -219,6 +217,8 @@ class Sanitizer
// Grab all the elements
$allElements = $this->xmlDocument->getElementsByTagName("*");
// remove doctype after node elements have been analyzed
$this->removeDoctype();
// Start the cleaning proccess
$this->startClean($allElements, $elementsToRemove);
......
......@@ -12,9 +12,14 @@ require_once( __DIR__ . '/data/AttributeInterface.php' );
require_once( __DIR__ . '/data/TagInterface.php' );
require_once( __DIR__ . '/data/AllowedAttributes.php' );
require_once( __DIR__ . '/data/AllowedTags.php' );
require_once( __DIR__ . '/data/XPath.php' );
require_once( __DIR__ . '/ElementReference/Resolver.php' );
require_once( __DIR__ . '/ElementReference/Subject.php' );
require_once( __DIR__ . '/ElementReference/Usage.php' );
require_once( __DIR__ . '/Exceptions/NestingException.php' );
require_once( __DIR__ . '/Helper.php' );
require_once( __DIR__ . '/Sanitizer.php' );
/*
* Print array as JSON and then
* exit program with a particular
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter