Safer version of Smarty3 compatibility.