From d0a7623b941310590d402b4336016daa374c0226 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 30 Dec 2019 02:25:01 +0000 Subject: [PATCH] Markdown: Protecting some more BBCode elements --- markdown/markdown.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/markdown/markdown.php b/markdown/markdown.php index 0f667373..740f2030 100644 --- a/markdown/markdown.php +++ b/markdown/markdown.php @@ -50,7 +50,8 @@ function markdown_post_local_start(App $a, &$request) { } // Elements that shouldn't be parsed - $elements = ['code', 'noparse', 'nobb', 'pre', 'share', 'url', 'img']; + $elements = ['code', 'noparse', 'nobb', 'pre', 'share', 'url', 'img', 'bookmark', + 'audio', 'video', 'youtube', 'vimeo', 'attachment', 'iframe', 'map', 'mail']; foreach ($elements as $element) { $request['body'] = preg_replace_callback("/\[" . $element . "(.*?)\](.*?)\[\/" . $element . "\]/ism", function ($match) use ($element) { -- 2.39.5