From 55200fe686751c9fdcf4452d5e0879fbfde40c69 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Wed, 15 Sep 2021 16:05:31 -0500 Subject: [PATCH] #4547: Strip BBCode from `download_shortcodes` JavaScript alerts Fixes: #4547 Discussion: https://github.com/e107inc/e107/pull/4547#issuecomment-917229877 --- e107_plugins/download/download_shortcodes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/download/download_shortcodes.php b/e107_plugins/download/download_shortcodes.php index f5806e0ab..83c84d2b6 100644 --- a/e107_plugins/download/download_shortcodes.php +++ b/e107_plugins/download/download_shortcodes.php @@ -373,7 +373,7 @@ class download_shortcodes extends e_shortcode if ($parm == "request") { - $agreetext = $tp->toAttribute($tp->toJSON($tp->filter($tp->toHTML($this->pref['agree_text'],FALSE,'DESCRIPTION'), 'str'))); + $agreetext = $tp->toAttribute($tp->toJSON($tp->toText($this->pref['agree_text'],FALSE,'DESCRIPTION'), 'str')); if ($this->var['download_mirror_type']) { @@ -473,7 +473,7 @@ class download_shortcodes extends e_shortcode $tp = e107::getParser(); $img = ''; - $agreetext = !empty($this->pref['agree_text']) ? $tp->toAttribute($tp->toJSON($tp->filter($tp->toHTML($this->pref['agree_text'],FALSE,'DESCRIPTION'), 'str'))) : ''; + $agreetext = !empty($this->pref['agree_text']) ? $tp->toAttribute($tp->toJSON($tp->toText($this->pref['agree_text'],FALSE,'DESCRIPTION'), 'str')) : ''; if(defined('IMAGE_DOWNLOAD')) {