From 08f8e2b4b8fcd54b38ac99e926fd11244891f200 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 13 Apr 2020 19:22:14 +0200 Subject: [PATCH] Disabled media bbcodes in amp version --- .../install/files/lib/system/bbcode/MediaBBCode.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php index c5e71e94b1..49fca2711b 100644 --- a/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/MediaBBCode.class.php @@ -22,7 +22,12 @@ class MediaBBCode extends AbstractBBCode { if ($parser->getOutputType() == 'text/html') { foreach (BBCodeMediaProvider::getCache() as $provider) { if ($provider->matches($content)) { - return $provider->getOutput($content); + if ($parser instanceof HtmlBBCodeParser && $parser->getIsGoogleAmp()) { + return StringUtil::getAnchorTag($content); + } + else { + return $provider->getOutput($content); + } } } } -- 2.20.1