From ee7affec450b72799dce4a7a9897708c56818832 Mon Sep 17 00:00:00 2001 From: Sean Madsen Date: Sun, 22 Apr 2018 09:29:03 -0400 Subject: [PATCH] Add Smarty modifier to purify HTML With this modifier, we can write Smarty code like:
{$untrustedHTML|purify}
By using the purify modifier, we've protected against XSS, even if the output variable contains HTML. --- CRM/Core/Smarty/plugins/modifier.purify.php | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 CRM/Core/Smarty/plugins/modifier.purify.php diff --git a/CRM/Core/Smarty/plugins/modifier.purify.php b/CRM/Core/Smarty/plugins/modifier.purify.php new file mode 100644 index 0000000000..230d6d0c37 --- /dev/null +++ b/CRM/Core/Smarty/plugins/modifier.purify.php @@ -0,0 +1,45 @@ +