Skip to content

Commit

Permalink
BUGFIX: Remove neos backend scripts from the text
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandschuetz authored Mar 7, 2024
1 parent 2438156 commit 8fb72c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Resources/Private/Fusion/Helper/StripTags.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ prototype(CodeQ.Blog.Utils:Helper.StripTags) < prototype(Neos.Fusion:Value) {
# api
value = ${value}

@process.removeScriptsAndStyles = ${String.pregReplace(value, '/<script[^>]*?>.*?<\/script>|<style[^>]*?>.*?<\/style>/si', ' ')}
@process.replaceTagsWithSpace = ${String.trim(String.replace(String.replace(String.pregReplace(value, '/<[^>]*>/', ' '), ' ', ' '), ' ', ' '))}
@process.replaceZ = ${String.stripTags(value)}
}

0 comments on commit 8fb72c2

Please sign in to comment.