private function securityTagsTemplate() { $results = array(); // Tag csrf_token $regex = "#\\{\\% csrftoken \\%\\}#"; preg_match_all($regex, $this->dataRender, $results, PREG_SET_ORDER); if (count($results) > 0) { $token = CSRF::generateToken(); $inputTag = '<input type="hidden" name="csrfToken" value="' . $token . '" />'; $this->dataRender = preg_replace($regex, $inputTag, $this->dataRender); } unset($results); }