I noticed that autotags are not processed in static pages when the option "execute PHP" is enabled. Possibly this is by design. However, I didn't see the risk of incorrect translation of text within a PHP block as a big concern in my case (considering the bracketed autotag format, and since I'm aware of the issue), so I made the following hack to my /plugins/staticpages/functions.inc.
If you implement this hack, be aware that strings in your PHP code that resemble autotags could be translated prior to the execution the PHP block, and hence this could cause problems, including security risks, so if you make this change, be sure that you don't put PHP code in static pages that includes autotag-like strings
Text Formatted Code
function SP_render_content ($sp_content, $sp_php)
{
global $_SP_CONF, $LANG_STATIC;
$retval = '';
if ($_SP_CONF['allow_php'] == 1) {
// Check for type (ie html or php)
if ($sp_php == 1) {
$sp_content = PLG_replacetags ($sp_content); // This line was added
$retval .= eval ($sp_content);
} else if ($sp_php == 2) {
$sp_content = PLG_replacetags ($sp_content); // This line was added
ob_start ();
eval ($sp_content);
$retval .= ob_get_contents ();
ob_end_clean ();
} else {
$retval .= PLG_replacetags ($sp_content);
}
} else {
if ($sp_php != 0) {
COM_errorLog ("PHP in static pages is disabled. Can not display page '$page'.", 1);
$retval .= $LANG_STATIC['deny_msg'];
} else {
$retval .= PLG_replacetags ($sp_content);
}
}
return $retval;
}