From 1cd3212736dd824c91fe1b0925fb247b1f62a08c Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sat, 14 Nov 2026 15:45:34 +0200 Subject: [PATCH] drop turbo attrs --- app/javascript/template_builder/dynamic_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/template_builder/dynamic_editor.js b/app/javascript/template_builder/dynamic_editor.js index cad495254..a15270727 100644 --- a/app/javascript/template_builder/dynamic_editor.js +++ b/app/javascript/template_builder/dynamic_editor.js @@ -178,7 +178,7 @@ const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{|#)/i function isSafeAttr (name, value) { const lowerName = name.toLowerCase() - if (lowerName.startsWith('on') || DROP_ATTRS.includes(lowerName)) return false + if (lowerName.startsWith('on') || lowerName.startsWith('data-turbo') || DROP_ATTRS.includes(lowerName)) return false if ((lowerName === 'href' || lowerName === 'src') && !SAFE_URL_REGEXP.test(value.trim())) return false return true