Valider f2ecbd9d rédigé par cerdic's avatar cerdic
Parcourir les fichiers

Mise a jour de SVG Sanitizer, on ajoute la version dans les credits fix...

Mise a jour de SVG Sanitizer, on ajoute la version dans les credits fix https://core.spip.net/issues/4682
parent 79311c06
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours

lib/svg-sanitizer/LICENSE

100644 → 100755
+0 −0

Le mode du fichier est passé de 100644 à 100755.

lib/svg-sanitizer/README.md

100644 → 100755
+10 −6
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -42,15 +42,15 @@ These methods require that you implement the `enshrined\svgSanitize\data\TagInte

## Remove remote references 

You have the option to remove attributes that reference remote files, this will stop HTTP leaks but will add an overhead to the sanitiser.
You have the option to remove attributes that reference remote files, this will stop HTTP leaks but will add an overhead to the sanitizer.

This defaults to false, set to true to remove references.

`$sanitizer->removeRemoteReferences(true);`

## Viewing Sanitisation Issues
## Viewing Sanitization Issues

You may use the `getXmlIssues()` method to return an array of issues that occurred during sanitisation.
You may use the `getXmlIssues()` method to return an array of issues that occurred during sanitization.

This may be useful for logging or providing feedback to the user on why an SVG was refused.

@@ -58,7 +58,7 @@ This may be useful for logging or providing feedback to the user on why an SVG w

## Minification

You can minify the XML output by calling `$sanitiser->minify(true);`.
You can minify the XML output by calling `$sanitizer->minify(true);`.

## Demo
There is a demo available at: [http://svg.enshrined.co.uk/](http://svg.enshrined.co.uk/)
@@ -71,9 +71,13 @@ I've just released a WordPress plugin containing this code so you can sanitize y

[Michael Potter](https://github.com/heyMP) has kindly created a Drupal module for this library which is available at: [https://www.drupal.org/project/svg_sanitizer](https://www.drupal.org/project/svg_sanitizer)

## TYPO3

An integration for TYPO3 CMS of this library is available as composer package `t3g/svg-sanitizer` at [https://github.com/TYPO3GmbH/svg_sanitizer](https://github.com/TYPO3GmbH/svg_sanitizer)

## Tests

You can run these by running `phpunit`
You can run these by running `vendor/bin/phpunit` from the base directory of this package.

## Standalone scanning of files via CLI

+10 −2
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
{
    "name": "enshrined/svg-sanitize",
    "description": "An SVG sanitizer for PHP",
    "license": "GPL-2.0+",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "Daryll Doyle",
@@ -13,8 +13,16 @@
            "enshrined\\svgSanitize\\": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "enshrined\\svgSanitize\\Tests\\": "tests"
        }
    },
    "minimum-stability": "stable",
    "require": {},
    "require": {
        "ext-dom": "*",
        "ext-libxml": "*"
    },
    "require-dev": {
        "phpunit/phpunit": "^6",
        "codeclimate/php-test-reporter": "^0.1.2"

lib/svg-sanitizer/composer.lock

supprimé100644 → 0
+0 −2259

Fichier supprimé.

La taille limite d'aperçu a été dépassée, l'affichage des modifications a donc été réduit.

lib/svg-sanitizer/phpunit.xml.dist

supprimé100644 → 0
+0 −23
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
         colors="true"
         stopOnFailure="false"
         syntaxCheck="false">

    <testsuites>
        <testsuite name="The project's test suite">
            <directory>./tests</directory>
        </testsuite>
    </testsuites>

    <logging>
        <log type="coverage-clover" target="./build/logs/clover.xml"/>
    </logging>

    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./src</directory>
        </whitelist>
    </filter>

</phpunit>
 No newline at end of file
Chargement en cours