From 86d89149ef2745f49ef9c8500a30df09c1898769 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 3 Jul 2012 20:45:11 +0200 Subject: [PATCH] Adding EscapeCDATA-Templatemodifier --- ...scapeCDATAModifierTemplatePlugin.class.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/template/plugin/EscapeCDATAModifierTemplatePlugin.class.php diff --git a/wcfsetup/install/files/lib/system/template/plugin/EscapeCDATAModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/EscapeCDATAModifierTemplatePlugin.class.php new file mode 100644 index 0000000000..829677fccd --- /dev/null +++ b/wcfsetup/install/files/lib/system/template/plugin/EscapeCDATAModifierTemplatePlugin.class.php @@ -0,0 +1,27 @@ +XYZ"|escapeCDATA} + * + * @author Tim Düsterhus + * @copyright 2001-2012 WoltLab GmbH + * @license GNU Lesser General Public License + * @package com.woltlab.wcf + * @subpackage system.template.plugin + * @category Community Framework + */ +class EscapeCDATAModifierTemplatePlugin implements IModifierTemplatePlugin { + /** + * @see wcf\system\template\IModifierTemplatePlugin::execute() + */ + public function execute($tagArgs, TemplateEngine $tplObj) { + return StringUtil::escapeCDATA($tagArgs[0]); + } +} -- 2.20.1