Safe SVG - Version 1.8.1

Version Description

  • Don't let errors break upload if uploading an empty file
  • Fix featured image display in Gutenberg. Props @hendridm :)
Download this release

Release Info

Developer enshrined
Plugin Icon 128x128 Safe SVG
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8.0 to 1.8.1

Files changed (3) hide show
  1. assets/safe-svg.css +7 -0
  2. readme.txt +5 -1
  3. safe-svg.php +2 -2
assets/safe-svg.css CHANGED
@@ -3,4 +3,11 @@
3
  */
4
  #postimagediv .inside .svg img {
5
  width: 100%;
 
 
 
 
 
 
 
6
  }
3
  */
4
  #postimagediv .inside .svg img {
5
  width: 100%;
6
+ }
7
+
8
+ /**
9
+ * Fix for Gutenberg not showing featured images correctly.
10
+ */
11
+ img.components-responsive-wrapper__content[src$=".svg"] {
12
+ position: relative;
13
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: svg, sanitize, upload, sanitise, security, svg upload, image, vector, file
5
  Requires at least: 4.0
6
  Tested up to: 4.9.1
7
  Requires PHP: 5.6
8
- Stable tag: 1.8.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -62,6 +62,10 @@ They take one argument that must be returned. See below for examples:
62
 
63
  == Changelog ==
64
 
 
 
 
 
65
  = 1.8.0 =
66
  * Pull SVG dimensions from the width/height or viewbox attributes of the SVG.
67
  * Add the role="img" attribute to SVGs
5
  Requires at least: 4.0
6
  Tested up to: 4.9.1
7
  Requires PHP: 5.6
8
+ Stable tag: 1.8.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
62
 
63
  == Changelog ==
64
 
65
+ = 1.8.1 =
66
+ * Don't let errors break upload if uploading an empty file
67
+ * Fix featured image display in Gutenberg. Props @hendridm :)
68
+
69
  = 1.8.0 =
70
  * Pull SVG dimensions from the width/height or viewbox attributes of the SVG.
71
  * Add the role="img" attribute to SVGs
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.8.0
7
  Author: Daryll Doyle
8
  Author URI: http://enshrined.co.uk
9
  Text Domain: safe-svg
@@ -367,7 +367,7 @@ if ( ! class_exists( 'safe_svg' ) ) {
367
  * @return array|bool
368
  */
369
  protected function svg_dimensions( $svg ) {
370
- $svg = simplexml_load_file( $svg );
371
  $width = 0;
372
  $height = 0;
373
  if ( $svg ) {
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.8.1
7
  Author: Daryll Doyle
8
  Author URI: http://enshrined.co.uk
9
  Text Domain: safe-svg
367
  * @return array|bool
368
  */
369
  protected function svg_dimensions( $svg ) {
370
+ $svg = @simplexml_load_file( $svg );
371
  $width = 0;
372
  $height = 0;
373
  if ( $svg ) {