diff --git a/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc b/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc index 592b130..4d1ce21 100644 --- a/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc +++ b/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc @@ -58,9 +58,9 @@ function media_wysiwyg_parse_css_declarations($declarations) { function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE) { static $recursion_stop; $settings = array(); - $match = str_replace("[[", "", $match); - $match = str_replace("]]", "", $match); - $tag = $match[0]; + $input = $match[0]; + $tag = str_replace("[[", "", $input); + $tag = str_replace("]]", "", $tag); try { if (!is_string($tag)) { @@ -160,7 +160,7 @@ function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE) { } catch (Exception $e) { watchdog('media', 'Unable to render media from %tag. Error: %error', array('%tag' => $tag, '%error' => $e->getMessage())); - return ''; + return $input; } // If the tag has link text stored with it, override the filename with it for