From 8aa702a4bfeee9e2de789a30aa7b09cfce174339 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Thu, 16 May 2019 13:33:04 +0200 Subject: [PATCH] Fix bug with external TinyMCE assets --- app/models/tiny_mce_asset.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))