diff --git a/app/helpers/protocols_io_helper.rb b/app/helpers/protocols_io_helper.rb index 20a53d99c..cafb7c94b 100644 --- a/app/helpers/protocols_io_helper.rb +++ b/app/helpers/protocols_io_helper.rb @@ -154,6 +154,7 @@ module ProtocolsIoHelper attribute_text1, size, table = 'no_table', image_allowed = false ) image_tag = image_allowed ? Array('img') : Array(nil) + image_tag.push('br') if table == 'no_table' attribute_text = sanitize_input(not_null(attribute_text1), image_tag) elsif table == 'table' @@ -393,6 +394,10 @@ module ProtocolsIoHelper pe_array = %w( name description os_name os_version ) + key['source_data']['name'] = + '
' +
+            not_null(key['source_data']['name'].gsub(/\n/, '
')) + + '
' trans_text = 'protocols.protocols_io_import.comp_append.command.' newj[i.to_s]['description'] += pio_stp( key['source_data'], pe_array, trans_text diff --git a/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb b/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb index d3e5e1282..2b4eff332 100644 --- a/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb +++ b/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb @@ -87,7 +87,7 @@ <% step_info_string += not_null(key['source_data']['description']) %>
<%= key['name']+': ' %> - <%= prepare_for_view(key['source_data']['name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %> + <%= prepare_for_view('
'+key['source_data']['name'].gsub(/\n/, '
')+'
',ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
<%= t('protocols.protocols_io_import.preview.s_desc') %> <%= prepare_for_view(key['source_data']['description'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>