From: Sean Madsen Date: Sun, 22 Apr 2018 13:29:03 +0000 (-0400) Subject: Add Smarty modifier to purify HTML X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ee7affec450b72799dce4a7a9897708c56818832;p=civicrm-core.git 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. --- 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 @@ +