Allow empty href in SVGs
authorMark Holmquist <mholmquist@wikimedia.org>
Mon, 31 Oct 2016 13:21:38 +0000 (08:21 -0500)
committerMark Holmquist <mholmquist@wikimedia.org>
Mon, 31 Oct 2016 13:29:38 +0000 (08:29 -0500)
bawolff is right, this shouldn't harm anything.

Bug: T149549
Change-Id: I377efdee7478940154ef5ec921bd0c8f7ec0c110

includes/upload/UploadBase.php

index 3422632..ea6ef30 100644 (file)
@@ -1507,6 +1507,7 @@ abstract class UploadBase {
                        # fragment links are allowed. For all other tags, only data:
                        # and fragment are allowed.
                        if ( $stripped == 'href'
+                               && $value !== ''
                                && strpos( $value, 'data:' ) !== 0
                                && strpos( $value, '#' ) !== 0
                        ) {