From: Tim Düsterhus Date: Tue, 3 Jul 2012 18:45:11 +0000 (+0200) Subject: Adding EscapeCDATA-Templatemodifier X-Git-Tag: 2.0.0_Beta_1~1034 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86d89149ef2745f49ef9c8500a30df09c1898769;p=GitHub%2FWoltLab%2FWCF.git Adding EscapeCDATA-Templatemodifier --- 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]); + } +}