From 075300028f07e0a528d2c58c9f0c58cee9aff027 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 7 Dec 2021 22:23:31 -0800 Subject: [PATCH] properly escape crazy characters in tags --- app/views/content/form/field_types/_tags.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/form/field_types/_tags.html.erb b/app/views/content/form/field_types/_tags.html.erb index 3ca43108..a2878ad3 100644 --- a/app/views/content/form/field_types/_tags.html.erb +++ b/app/views/content/form/field_types/_tags.html.erb @@ -60,7 +60,7 @@ }, data: [ <% page.page_tags.pluck(:tag).each do |tag| %> - {tag: '<%= tag %>'}, + {tag: "<%= tag.gsub('"', '\"').html_safe %>"}, <% end %> ], onChipAdd: update_hidden_page_tag_value,