diff --git a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb
index 2ad86270e..59b4d63e5 100644
--- a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb
+++ b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb
@@ -17,6 +17,7 @@
<% prot_info_string = '' %>
+ <% protocol_table_elements_array = [] %>
<% if json_object['before_start'].present? %>
<% prot_info_string += (json_object['before_start']) %>
<%= t('protocols.protocols_io_import.preview.b_s_p') %>
@@ -67,21 +68,32 @@
<% if tables.present? %>
<% end %>
- <%#= sanitize_input(garbage.html_safe) %>
<% table_count = 0 %>
<% tables.each do |index, table| %>
<% table_hash = JSON.parse((Base64.decode64(table['contents']))) %>
<% pio_table_id = "pio_table_prot_info_"+table_count.to_s %>
-
+ <% protocol_table_elements_array.push([pio_table_id,table_hash['data']]) %>
+
-
-
- <% table_count += 1 %>
- <% 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 9b79e4ba3..2654e9a19 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
@@ -114,31 +114,40 @@
<% tables.each do |index, table| %>
<% table_hash = JSON.parse((Base64.decode64(table['contents']))) %>
<% pio_table_id = "pio_table_step_"+counter.to_s+"_info_"+table_count.to_s %>
- <% step_table_elements_array.push([pio_table_id,table_hash]) %>
-