]> git.mxchange.org Git - friendica.git/blobdiff - include/template_processor.php
Merge pull request #656 from fabrixxm/master
[friendica.git] / include / template_processor.php
index 6c5908d92e8d8f1d1c5f318bb868c3c6199d1f55..ebc03b8d84404907e350ec4367bf19e9d40a0299 100644 (file)
@@ -259,15 +259,15 @@ class Template {
        public function replace($s, $r) {
                $this->r = $r;
 
+               // remove comments block
+               $s = preg_replace('/{#(.*?\s*?)*?#}/', "", $s);
+
                $s = $this->_build_nodes($s);
 
                $s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s);
                if ($s == Null)
                        $this->_preg_error();
 
-               // remove comments block
-               $s = preg_replace('/{#[^#]*#}/', "", $s);
-
                // replace strings recursively (limit to 10 loops)
                $os = "";
                $count = 0;