@@ -253,6 +253,7 @@ function compile_template($data, $template_name, $theme, $lang, $tolerate_errors
// Handle the level we just closed
$_escaped=str_split(preg_replace('#[^:\.`%\*=\;\#\-~\^\|\'&/@+]:?#','',$_first_param));// :? is so that the ":" in language string IDs does not get considered an escape
$escaped=array();
$no_preprocess=false;
foreach($_escapedas$e){
switch($e){
case'`':
@@ -303,6 +304,7 @@ function compile_template($data, $template_name, $theme, $lang, $tolerate_errors
// This is used as a hint to not preprocess
case'-':
$no_preprocess=true;
// NB: we're out of ASCII symbols now. We want to avoid []()<>" brackets, whitespace characters, and control codes, and others are used for Tempcode grammar or are valid identifier characters.
// Actually +/$/! can be used at the end (+ is already taken)
}
@@ -326,7 +328,6 @@ function compile_template($data, $template_name, $theme, $lang, $tolerate_errors
array_push($preprocessable_bits_stack,$preprocessable_bits);// So anything inside will end up being thrown away when we pop back to what we had before in $preprocessable_bits
}
}elseif($eval==='END'){// END
}elseif($first_param==='"END"'){// END
// Test that the top stack does represent a started directive, and close directive level
$past_level_data=$current_level_data;
if($past_level_data===array()){
@@ -522,7 +518,7 @@ function compile_template($data, $template_name, $theme, $lang, $tolerate_errors
@@ -690,7 +686,7 @@ function compile_template($data, $template_name, $theme, $lang, $tolerate_errors
if(!is_string($eval)){
$eval='';
}
if(($template_name===$eval)||((!$GLOBALS['SEMI_DEV_MODE'])&&(get_param_string('special_page_type','')===''))&&($count_directive_opener_params===3)&&($past_level_data===array('""'))&&(!isset($FILE_ARRAY))){// Simple case
if(((!$no_preprocess)&&($template_name===$eval))||((!$no_preprocess)&&(get_param_string('special_page_type','')===''))&&($count_directive_opener_params===3)&&($past_level_data===array('""'))&&(!isset($FILE_ARRAY))){// Simple case