private static function protectSpecialCode($string) { require_once __DIR__ . '/protect.php'; // Protect PHP code RLProtect::protectByRegex($string, '#(<|<)\\?php\\s.*?\\?(>|>)#s'); // Protect {...} tags RLProtect::protectByRegex($string, '#\\{.*?\\}#s'); // Protect [...] tags RLProtect::protectByRegex($string, '#\\[.*?\\]#s'); RLProtect::convertProtectionToHtmlSafe($string); return $string; }