From: Alexander Ebert Date: Thu, 16 Jan 2020 15:10:34 +0000 (+0100) Subject: Properly suppress links in the AttachmentBBCode when requested by the parser X-Git-Tag: 5.2.2~53 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b20b9a0b12fd4d6b745c28f72c24a13292adc4e4;p=GitHub%2FWoltLab%2FWCF.git Properly suppress links in the AttachmentBBCode when requested by the parser --- diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index b413afee00..37c534c916 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -40,7 +40,11 @@ class AttachmentBBCode extends AbstractBBCode { } $hasParentLink = false; - if (!empty($closingTag['__parents'])) { + /** @var HtmlBBCodeParser $parser */ + if ($parser->getRemoveLinks()) { + $hasParentLink = true; + } + else if (!empty($closingTag['__parents'])) { /** @var \DOMElement $parent */ foreach ($closingTag['__parents'] as $parent) { if ($parent->nodeName === 'a') {