global $wgContLang, $wgUser, $wgThumbLimits;
$img = new Image( $nt );
- if ( !$img->allowInlineDisplay() ) {
+ if ( !$img->allowInlineDisplay() && $img->exists() ) {
return $this->makeKnownLinkObj( $nt );
}
-# MediaWiki Parser test cases
+# MediaWiki Parser test cases
# Some taken from http://meta.wikimedia.org/wiki/Parser_testing
# All (C) their respective authors and released under the GPL
#
!! test
External links: invalid character
!! input
-[http://www.example.com\0 test]
+[http://www.example.com test]
!! result
-<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a>\0 test]
+<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
</p>
!! end