Version Description
- Fixed an issue with empty svg elements self-closing
Download this release
Release Info
Developer | enshrined |
Plugin | Safe SVG |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
lib/composer.lock
CHANGED
@@ -8,16 +8,16 @@
|
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "enshrined/svg-sanitize",
|
11 |
-
"version": "0.2.
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
15 |
-
"reference": "
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/
|
20 |
-
"reference": "
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"require-dev": {
|
@@ -41,7 +41,7 @@
|
|
41 |
}
|
42 |
],
|
43 |
"description": "An SVG sanitizer for PHP",
|
44 |
-
"time": "2015-06
|
45 |
}
|
46 |
],
|
47 |
"packages-dev": [],
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "enshrined/svg-sanitize",
|
11 |
+
"version": "0.2.1",
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
15 |
+
"reference": "ed123c268311b2f64adb5f417ffe30ed84335f5f"
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
+
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/ed123c268311b2f64adb5f417ffe30ed84335f5f",
|
20 |
+
"reference": "ed123c268311b2f64adb5f417ffe30ed84335f5f",
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"require-dev": {
|
41 |
}
|
42 |
],
|
43 |
"description": "An SVG sanitizer for PHP",
|
44 |
+
"time": "2015-07-06 23:33:41"
|
45 |
}
|
46 |
],
|
47 |
"packages-dev": [],
|
lib/vendor/composer/installed.json
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "enshrined/svg-sanitize",
|
4 |
-
"version": "0.2.
|
5 |
-
"version_normalized": "0.2.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
18 |
"codeclimate/php-test-reporter": "^0.1.2",
|
19 |
"phpunit/phpunit": "^4.7"
|
20 |
},
|
21 |
-
"time": "2015-06
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"autoload": {
|
1 |
[
|
2 |
{
|
3 |
"name": "enshrined/svg-sanitize",
|
4 |
+
"version": "0.2.1",
|
5 |
+
"version_normalized": "0.2.1.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
9 |
+
"reference": "ed123c268311b2f64adb5f417ffe30ed84335f5f"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/ed123c268311b2f64adb5f417ffe30ed84335f5f",
|
14 |
+
"reference": "ed123c268311b2f64adb5f417ffe30ed84335f5f",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
18 |
"codeclimate/php-test-reporter": "^0.1.2",
|
19 |
"phpunit/phpunit": "^4.7"
|
20 |
},
|
21 |
+
"time": "2015-07-06 23:33:41",
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"autoload": {
|
lib/vendor/enshrined/svg-sanitize/.travis.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
language: php
|
2 |
php:
|
|
|
3 |
- 5.4
|
4 |
- 5.5
|
5 |
- 5.6
|
1 |
language: php
|
2 |
php:
|
3 |
+
- 5.3
|
4 |
- 5.4
|
5 |
- 5.5
|
6 |
- 5.6
|
lib/vendor/enshrined/svg-sanitize/README.md
CHANGED
@@ -43,6 +43,10 @@ These methods require that you implement the `enshrined\svgSanitize\data\TagInte
|
|
43 |
## Demo
|
44 |
There is a demo available at: [http://svg.enshrined.co.uk/](http://svg.enshrined.co.uk/)
|
45 |
|
|
|
|
|
|
|
|
|
46 |
## Tests
|
47 |
|
48 |
You can run these by running `phpunit`
|
43 |
## Demo
|
44 |
There is a demo available at: [http://svg.enshrined.co.uk/](http://svg.enshrined.co.uk/)
|
45 |
|
46 |
+
## WordPress
|
47 |
+
|
48 |
+
I've just released a WordPress plugin containing this code so you can sanitize your WordPress uploads. It's available from the WordPress plugin directory: [https://wordpress.org/plugins/safe-svg/](https://wordpress.org/plugins/safe-svg/)
|
49 |
+
|
50 |
## Tests
|
51 |
|
52 |
You can run these by running `phpunit`
|
lib/vendor/enshrined/svg-sanitize/src/Sanitizer.php
CHANGED
@@ -138,7 +138,7 @@ class Sanitizer
|
|
138 |
$this->startClean($allElements);
|
139 |
|
140 |
// Save cleaned XML to a variable
|
141 |
-
$clean = $this->xmlDocument->saveXML($this->xmlDocument->documentElement);
|
142 |
|
143 |
$this->resetAfter();
|
144 |
// Return result
|
138 |
$this->startClean($allElements);
|
139 |
|
140 |
// Save cleaned XML to a variable
|
141 |
+
$clean = $this->xmlDocument->saveXML($this->xmlDocument->documentElement, LIBXML_NOEMPTYTAG);
|
142 |
|
143 |
$this->resetAfter();
|
144 |
// Return result
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://enshrined.co.uk
|
|
4 |
Tags: svg, sanitize, uploads, sanitise, security, svg upload
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -32,3 +32,6 @@ Install through the WordPress directory or download, unzip and upload the files
|
|
32 |
* Added da, de ,en, es, fr, nl and ru translations
|
33 |
* Fixed an issue with filename not being pulled over on failed uploads
|
34 |
|
|
|
|
|
|
4 |
Tags: svg, sanitize, uploads, sanitise, security, svg upload
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
32 |
* Added da, de ,en, es, fr, nl and ru translations
|
33 |
* Fixed an issue with filename not being pulled over on failed uploads
|
34 |
|
35 |
+
= 1.1.1 =
|
36 |
+
* Fixed an issue with empty svg elements self-closing
|
37 |
+
|
safe-svg.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Safe SVG
|
4 |
Plugin URI: https://wordpress.org/plugins/safe-svg/
|
5 |
Description: Allows SVG uploads into Wordpress and sanitizes the SVG before saving it
|
6 |
-
Version: 1.1.
|
7 |
Author: Daryll Doyle
|
8 |
Author URI: http://enshrined.co.uk
|
9 |
Text Domain: safe-svg
|
3 |
Plugin Name: Safe SVG
|
4 |
Plugin URI: https://wordpress.org/plugins/safe-svg/
|
5 |
Description: Allows SVG uploads into Wordpress and sanitizes the SVG before saving it
|
6 |
+
Version: 1.1.1
|
7 |
Author: Daryll Doyle
|
8 |
Author URI: http://enshrined.co.uk
|
9 |
Text Domain: safe-svg
|