mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 11:54:26 +02:00
strip backticks from math equations
This commit is contained in:
@@ -27,7 +27,8 @@ function smarty_function_math($params, &$smarty)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$equation = $params['equation'];
|
// strip out backticks, not necessary for math
|
||||||
|
$equation = str_replace('`','',$params['equation']);
|
||||||
|
|
||||||
// make sure parenthesis are balanced
|
// make sure parenthesis are balanced
|
||||||
if (substr_count($equation,"(") != substr_count($equation,")")) {
|
if (substr_count($equation,"(") != substr_count($equation,")")) {
|
||||||
|
Reference in New Issue
Block a user