Render bad images in wikitext as links
authorJackmcbarn <jackmcbarn@gmail.com>
Thu, 8 Jan 2015 17:53:33 +0000 (12:53 -0500)
committerJackmcbarn <jackmcbarn@gmail.com>
Sun, 19 Jun 2016 03:24:57 +0000 (03:24 +0000)
In galleries, bad images are rendered as links. This causes the same behavior
to occur in wikitext, rather than the current behavior of not rendering
anything.

Change-Id: I1a074bff7cb661b5b4e6db9503eb6a5de702ee2f

includes/parser/Parser.php

index 01f6b80..aca32ed 100644 (file)
@@ -2296,13 +2296,9 @@ class Parser {
                                                # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them
                                                $s .= $prefix . $this->armorLinks(
                                                        $this->makeImage( $nt, $text, $holders ) ) . $trail;
-                                       } else {
-                                               $s .= $prefix . $trail;
+                                               continue;
                                        }
-                                       continue;
-                               }
-
-                               if ( $ns == NS_CATEGORY ) {
+                               } elseif ( $ns == NS_CATEGORY ) {
                                        $s = rtrim( $s . "\n" ); # bug 87
 
                                        if ( $wasblank ) {