From 9adfe7b4807b3cc10dbb7351a26cc32f5d8c14a3 Mon Sep 17 00:00:00 2001 From: Bram Jetten Date: Wed, 28 Jun 2023 13:07:55 +0200 Subject: [PATCH] Sanitiez title (#1258) --- app/components/spina/pages/actions_component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/spina/pages/actions_component.html.erb b/app/components/spina/pages/actions_component.html.erb index dac83aa8a..cee66a50e 100644 --- a/app/components/spina/pages/actions_component.html.erb +++ b/app/components/spina/pages/actions_component.html.erb @@ -40,7 +40,7 @@ <% end %> <% if @page.deletable? %> - <%= button_to t('spina.pages.delete'), helpers.spina.admin_page_path(@page), method: :delete, class: "block w-full text-left px-4 py-2 text-sm leading-5 font-medium text-red-500 cursor-pointer bg-white hover:bg-red-100 hover:bg-opacity-50 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-gray-900", form: {data: {controller: "confirm", confirm_message: t('spina.pages.delete_confirmation', subject: @page.title)}} %> + <%= button_to t('spina.pages.delete'), helpers.spina.admin_page_path(@page), method: :delete, class: "block w-full text-left px-4 py-2 text-sm leading-5 font-medium text-red-500 cursor-pointer bg-white hover:bg-red-100 hover:bg-opacity-50 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-gray-900", form: {data: {controller: "confirm", confirm_message: t('spina.pages.delete_confirmation', subject: sanitize(@page.title))}} %> <% else %> <%=t 'spina.pages.cannot_be_deleted' %> <% end %>