Fixed HTML syntax issue
authorMarcel Werk <burntime@woltlab.com>
Sat, 17 May 2014 13:11:00 +0000 (15:11 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 17 May 2014 13:11:00 +0000 (15:11 +0200)
wcfsetup/install/files/lib/system/bbcode/ImageBBCode.class.php

index 41edcb60a001f3ce78a16a2eeb020d660e79837f..642d0b9cbdc991863ca8f2e4b9bbe5ba41917aed 100644 (file)
@@ -32,7 +32,12 @@ class ImageBBCode extends AbstractBBCode {
                }
                else if ($parser->getOutputType() == 'text/simplified-html') {
                        $src = StringUtil::decodeHTML($src);
-                       return StringUtil::getAnchorTag($src);
+                       $path = parse_url($src, PHP_URL_PATH);
+                       if ($path !== false) {
+                               return StringUtil::encodeHTML(basename($path));
+                       }
+                       
+                       return '';
                }
        }
 }