Merge pull request #1774 from Ducz0r/lm-hotfix-tinymce-images

Fix bug with external TinyMCE assets
This commit is contained in:
Luka Murn 2019-05-16 13:34:46 +02:00 committed by GitHub
commit c844158f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))