diff --git a/app/models/tiny_mce_asset.rb b/app/models/tiny_mce_asset.rb index 1b394fc3b..e6992377c 100644 --- a/app/models/tiny_mce_asset.rb +++ b/app/models/tiny_mce_asset.rb @@ -53,7 +53,7 @@ class TinyMceAsset < ApplicationRecord description = update_old_tinymce(description, obj) description = Nokogiri::HTML(description) - tm_assets = description.css('img') + tm_assets = description.css('img[data-mce-token]') tm_assets.each do |tm_asset| asset_id = tm_asset.attr('data-mce-token') new_asset_url = find_by_id(Base62.decode(asset_id))