diff --git a/doc/BBCode.md b/doc/BBCode.md
index 47e45b7aca..753bc69425 100644
--- a/doc/BBCode.md
+++ b/doc/BBCode.md
@@ -502,10 +502,6 @@ You can embed video, audio and more in a message.
[url]*url*[/url] |
Wenn *url* die OEmbed- oder Opengraph-Spezifikationen unterstützt, wird das Objekt eingebettet (z.B. Dokumente von scribd).
diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 73503cece8..e41511f5a3 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -1622,11 +1622,8 @@ class BBCode
'$1', $text);
}
- if ($try_oembed) {
- $text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '', $text);
- } else {
- $text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '$1', $text);
- }
+ // Backward compatibility, [iframe] support has been removed in version 2020.12
+ $text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '$1', $text);
// Youtube extensions
if ($try_oembed) {
diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php
index e8d0943ca4..6f2d7c7905 100644
--- a/src/Content/Text/HTML.php
+++ b/src/Content/Text/HTML.php
@@ -290,7 +290,8 @@ class HTML
self::tagToBBCode($doc, 'video', ['src' => '/(.+)/'], '[video]$1', '[/video]', true);
self::tagToBBCode($doc, 'audio', ['src' => '/(.+)/'], '[audio]$1', '[/audio]', true);
- self::tagToBBCode($doc, 'iframe', ['src' => '/(.+)/'], '[iframe]$1', '[/iframe]', true);
+ // Backward compatibility, [iframe] support has been removed in version 2020.12
+ self::tagToBBCode($doc, 'iframe', ['src' => '/(.+)/'], '[url]$1', '[/url]', true);
self::tagToBBCode($doc, 'key', [], '[code]', '[/code]');
self::tagToBBCode($doc, 'code', [], '[code]', '[/code]');
@@ -630,6 +631,7 @@ class HTML
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/'], ' ', ' ');
}
+ // Backward compatibility, [iframe] support has been removed in version 2020.12
self::tagToBBCode($doc, 'iframe', ['src' => '/(.+)/'], ' $1 ', '');
$message = $doc->saveHTML();
|