diff --git a/app/helpers/protocols_io_helper.rb b/app/helpers/protocols_io_helper.rb
index 6490c4e54..d1107561f 100644
--- a/app/helpers/protocols_io_helper.rb
+++ b/app/helpers/protocols_io_helper.rb
@@ -175,9 +175,13 @@ module ProtocolsIoHelper
else
' , '
end
- output_string += prepare_for_view(
- attribute_text, ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
- )
+ if attribute_name == 'protocol_name'
+ output_string += pio_eval_title_len(attribute_text)
+ else
+ output_string += prepare_for_view(
+ attribute_text, ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
+ )
+ end
output_string
end
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 7c3c82092..1862c22ea 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
@@ -98,7 +98,7 @@
<% when '18'%>
<%= t('protocols.protocols_io_import.preview.sub_prot') %>
- <%= prepare_for_view(key['source_data']['protocol_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
+ <%= pio_eval_title_len(sanitize_input(key['source_data']['protocol_name'])).html_safe %>
<%= t('protocols.protocols_io_import.preview.auth') %>
<%= prepare_for_view(key['source_data']['full_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>