diff --git a/app/helpers/tiny_mce_helper.rb b/app/helpers/tiny_mce_helper.rb index 0b9da187e..62431604d 100644 --- a/app/helpers/tiny_mce_helper.rb +++ b/app/helpers/tiny_mce_helper.rb @@ -18,6 +18,7 @@ module TinyMceHelper end def generate_image_tag_from_token(text) + return unless text regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/ text.gsub(regex) do |el| match = el.match(regex)