Version Description
- Fix PHP strict standards warning
Download this release
Release Info
| Developer | enshrined |
| Plugin | |
| Version | 1.5.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.5.0 to 1.5.1
- readme.txt +5 -2
- safe-svg.php +4 -3
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: enshrined
|
|
| 3 |
Donate link: https://wpsvg.com/
|
| 4 |
Tags: svg, sanitize, upload, sanitise, security, svg upload, image, vector, file, graphic, media, mime
|
| 5 |
Requires at least: 4.0
|
| 6 |
-
Tested up to: 4.8.
|
| 7 |
-
Stable tag: 1.5.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -39,6 +39,9 @@ Install through the WordPress directory or download, unzip and upload the files
|
|
| 39 |
|
| 40 |
== Changelog ==
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
= 1.5.0 =
|
| 43 |
* Library update
|
| 44 |
* role, aria- and data- attributes are now whitelisted to improve accessibility
|
| 3 |
Donate link: https://wpsvg.com/
|
| 4 |
Tags: svg, sanitize, upload, sanitise, security, svg upload, image, vector, file, graphic, media, mime
|
| 5 |
Requires at least: 4.0
|
| 6 |
+
Tested up to: 4.8.1
|
| 7 |
+
Stable tag: 1.5.1
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 39 |
|
| 40 |
== Changelog ==
|
| 41 |
|
| 42 |
+
= 1.5.1 =
|
| 43 |
+
* Fix PHP strict standards warning
|
| 44 |
+
|
| 45 |
= 1.5.0 =
|
| 46 |
* Library update
|
| 47 |
* role, aria- and data- attributes are now whitelisted to improve accessibility
|
safe-svg.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Safe SVG
|
| 4 |
Plugin URI: https://wpsvg.com/
|
| 5 |
Description: Allows SVG uploads into WordPress and sanitizes the SVG before saving it
|
| 6 |
-
Version: 1.5.
|
| 7 |
Author: Daryll Doyle
|
| 8 |
Author URI: http://enshrined.co.uk
|
| 9 |
Text Domain: safe-svg
|
|
@@ -74,7 +74,8 @@ if ( ! class_exists( 'safe_svg' ) ) {
|
|
| 74 |
public function fix_mime_type_svg( $data = null, $file = null, $filename = null, $mimes = null ) {
|
| 75 |
$ext = isset( $data['ext'] ) ? $data['ext'] : '';
|
| 76 |
if ( strlen( $ext ) < 1 ) {
|
| 77 |
-
|
|
|
|
| 78 |
}
|
| 79 |
if ( $ext === 'svg' ) {
|
| 80 |
$data['type'] = 'image/svg+xml';
|
|
@@ -179,7 +180,7 @@ if ( ! class_exists( 'safe_svg' ) ) {
|
|
| 179 |
|
| 180 |
$sizes = array();
|
| 181 |
|
| 182 |
-
foreach ( $possible_sizes as $size ) {
|
| 183 |
$sizes[ $size ] = array(
|
| 184 |
'height' => 2000,
|
| 185 |
'width' => 2000,
|
| 3 |
Plugin Name: Safe SVG
|
| 4 |
Plugin URI: https://wpsvg.com/
|
| 5 |
Description: Allows SVG uploads into WordPress and sanitizes the SVG before saving it
|
| 6 |
+
Version: 1.5.1
|
| 7 |
Author: Daryll Doyle
|
| 8 |
Author URI: http://enshrined.co.uk
|
| 9 |
Text Domain: safe-svg
|
| 74 |
public function fix_mime_type_svg( $data = null, $file = null, $filename = null, $mimes = null ) {
|
| 75 |
$ext = isset( $data['ext'] ) ? $data['ext'] : '';
|
| 76 |
if ( strlen( $ext ) < 1 ) {
|
| 77 |
+
$exploded = explode( '.', $filename );
|
| 78 |
+
$ext = strtolower( end( $exploded ) );
|
| 79 |
}
|
| 80 |
if ( $ext === 'svg' ) {
|
| 81 |
$data['type'] = 'image/svg+xml';
|
| 180 |
|
| 181 |
$sizes = array();
|
| 182 |
|
| 183 |
+
foreach ( $possible_sizes as $size => $label ) {
|
| 184 |
$sizes[ $size ] = array(
|
| 185 |
'height' => 2000,
|
| 186 |
'width' => 2000,
|
