From b70d208d3f9b3265d7afa7c8d05cca9b4d458e96 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 4 Nov 2009 14:18:11 +0000 Subject: [PATCH] "alternative syntax using double curly brackets, agressivly removing all xml-tags eg. Word adds within placeholders: {{user/n_fn}} or {{user/n_fn}} --> $$user/n_fn$$" --- etemplate/inc/class.bo_merge.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 85a5005c67..acf7c59ff9 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -262,6 +262,10 @@ abstract class bo_merge $err = lang("Document '%1' does not exist or is not readable for you!",$document); return false; } + // alternative syntax using double curly brackets (eg. {{cat_id}} instead $$cat_id$$), + // agressivly removing all xml-tags eg. Word adds within placeholders + $content = preg_replace_callback('/{{[^}]+}}/i',create_function('$p','return \'$$\'.strip_tags(substr($p[0],2,-2)).\'$$\';'),$content); + // make currently processed mimetype available to class methods; $this->mimetype = $mimetype;