From 8fb72c2cf4e4c8f2a21d0d21451369f00e9b6b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Sch=C3=BCtz?= Date: Thu, 7 Mar 2024 13:48:36 +0100 Subject: [PATCH] BUGFIX: Remove neos backend scripts from the text --- Resources/Private/Fusion/Helper/StripTags.fusion | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Private/Fusion/Helper/StripTags.fusion b/Resources/Private/Fusion/Helper/StripTags.fusion index e748a86..a5ae586 100644 --- a/Resources/Private/Fusion/Helper/StripTags.fusion +++ b/Resources/Private/Fusion/Helper/StripTags.fusion @@ -5,6 +5,7 @@ prototype(CodeQ.Blog.Utils:Helper.StripTags) < prototype(Neos.Fusion:Value) { # api value = ${value} + @process.removeScriptsAndStyles = ${String.pregReplace(value, '/]*?>.*?<\/script>|]*?>.*?<\/style>/si', ' ')} @process.replaceTagsWithSpace = ${String.trim(String.replace(String.replace(String.pregReplace(value, '/<[^>]*>/', ' '), ' ', ' '), ' ', ' '))} @process.replaceZ = ${String.stripTags(value)} }