mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-03 02:26:41 +03:00
escape helpers. fixes #42
This commit is contained in:
parent
390bc70a0c
commit
3a3ab36c5f
@ -406,7 +406,11 @@ class Template
|
|||||||
$name = array_shift($args);
|
$name = array_shift($args);
|
||||||
$current[Tokenizer::NAME] = $name;
|
$current[Tokenizer::NAME] = $name;
|
||||||
$current[Tokenizer::ARGS] = implode(' ', $args);
|
$current[Tokenizer::ARGS] = implode(' ', $args);
|
||||||
return $this->_section($context, $current);
|
$result = $this->_section($context, $current);
|
||||||
|
if ( $escaped ) {
|
||||||
|
$result = htmlspecialchars($result);
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user