\n"
asset_xml << "#{img.image_file_name}\n"
asset_xml << "#{img.image_content_type}\n"
@@ -259,7 +259,7 @@ module ProtocolsExporter
eln_xsd << "\n"
eln_xsd << "\n"
- eln_xsd << "\n"
eln_xsd << "\n"
diff --git a/app/utilities/protocols_importer.rb b/app/utilities/protocols_importer.rb
index ce8276457..5c03b7a83 100644
--- a/app/utilities/protocols_importer.rb
+++ b/app/utilities/protocols_importer.rb
@@ -160,7 +160,7 @@ module ProtocolsImporter
)
tiny_mce_img.image_content_type = tiny_mce_img_json['fileType']
tiny_mce_img.save!
- description.gsub!("[~tiny_mce_id:#{tiny_mce_img_json['token_id']}]",
+ description.gsub!("[~tiny_mce_id:#{tiny_mce_img_json['tokenId']}]",
"[~tiny_mce_id:#{tiny_mce_img.id}]")
end
@@ -170,7 +170,6 @@ module ProtocolsImporter
# handle import from legacy exports
def populate_rte_legacy(step_json)
return unless step_json['description'] && step_json['description'].present?
- regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/
- step_json['description'].gsub(regex, '')
+ step_json['description'].gsub(/\[~tiny_mce_id:([0-9a-zA-Z]+)\]/, '')
end
end
diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb
index cec5aa74d..bbb5912b7 100644
--- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb
+++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb
@@ -85,7 +85,7 @@
<%= t("protocols.steps.no_description") %>
<% else %>
- <%= sanitize_input(step.description) %>
+ <%= sanitize_input(generate_image_tag_from_token(step.description), ['img']) %>
<% end %>