diff --git a/e107_core/bbcodes/bb_img.php b/e107_core/bbcodes/bb_img.php index b51f2fd20..c0559e677 100644 --- a/e107_core/bbcodes/bb_img.php +++ b/e107_core/bbcodes/bb_img.php @@ -38,7 +38,8 @@ class bb_img extends e_bb_base { $tp = e107::getParser(); - $code_text = str_replace('{e_MEDIA_IMAGE}', e_HTTP."thumb.php?src={e_MEDIA_IMAGE}", $code_text); + // Replace the bbcode path with a real one. + $code_text = str_replace('{e_MEDIA_IMAGE}', e_HTTP."thumb.php?src=e_MEDIA_IMAGE/", $code_text); $imgParms = $this->processParm($code_text, $parm); foreach($imgParms as $k => $v) diff --git a/e107_plugins/tinymce/plugins/e107bbcode/parser.php b/e107_plugins/tinymce/plugins/e107bbcode/parser.php index 7358fc486..e26f8f13d 100644 --- a/e107_plugins/tinymce/plugins/e107bbcode/parser.php +++ b/e107_plugins/tinymce/plugins/e107bbcode/parser.php @@ -72,7 +72,7 @@ if($_POST['mode'] == 'tobbcode') if(check_class($pref['post_html'])) // Plain HTML mode. { $srch = array('src="'.e_HTTP.'thumb.php?','src="/{e_MEDIA_IMAGE}'); - $repl = array('src="{e_BASE}thumb.php?','src="{e_BASE}thumb.php?src={e_MEDIA_IMAGE}'); + $repl = array('src="{e_BASE}thumb.php?','src="{e_BASE}thumb.php?src=e_MEDIA_IMAGE/'); $content = str_replace($srch, $repl, $content);