From: Alexander Ebert Date: Thu, 21 Jul 2016 21:44:18 +0000 (+0200) Subject: Fixed media bbcode X-Git-Tag: 3.0.0_Beta_1~1010 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f31f2906abcdd181d426ec405967023d2d473a2e;p=GitHub%2FWoltLab%2FWCF.git Fixed media bbcode --- diff --git a/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php index b2525f88d8..2d4a81c954 100644 --- a/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php @@ -16,7 +16,7 @@ class MediaBBCode extends AbstractBBCode { * @inheritDoc */ public function getParsedTag(array $openingTag, $content, array $closingTag, BBCodeParser $parser) { - $content = StringUtil::trim($content); + $content = StringUtil::trim($openingTag['attributes'][0]); if ($parser->getOutputType() == 'text/html') { foreach (BBCodeMediaProvider::getCache() as $provider) { @@ -25,7 +25,7 @@ class MediaBBCode extends AbstractBBCode { } } } - if ($parser->getOutputType() == 'text/simplified-html') { + else if ($parser->getOutputType() == 'text/simplified-html') { foreach (BBCodeMediaProvider::getCache() as $provider) { if ($provider->matches($content)) { return StringUtil::getAnchorTag($content);