mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Remove |raw modifier. It is not good idea. Need tag {raw <expr>}
This commit is contained in:
parent
3d0475e95c
commit
b99b874d38
@ -395,11 +395,10 @@ class Template extends Render {
|
||||
* Output the value
|
||||
*
|
||||
* @param $data
|
||||
* @param $tag
|
||||
* @return string
|
||||
*/
|
||||
private function _print($data, $tag) {
|
||||
if($this->_options & Fenom::AUTO_ESCAPE && !$tag->raw) {
|
||||
private function _print($data) {
|
||||
if($this->_options & Fenom::AUTO_ESCAPE) {
|
||||
return "echo htmlspecialchars($data, ENT_COMPAT, 'UTF-8')";
|
||||
} else {
|
||||
return "echo $data";
|
||||
@ -883,11 +882,6 @@ class Template extends Render {
|
||||
while($tokens->is("|")) {
|
||||
$mods = $this->_fenom->getModifier( $modifier_name = $tokens->getNext(Tokenizer::MACRO_STRING) );
|
||||
|
||||
if($modifier_name == "raw") {
|
||||
$tokens->raw = false;
|
||||
$tokens->next();
|
||||
continue;
|
||||
}
|
||||
$tokens->next();
|
||||
$args = array();
|
||||
|
||||
|
@ -81,7 +81,6 @@ class Tokenizer {
|
||||
public $tokens;
|
||||
public $p = 0;
|
||||
public $quotes = 0;
|
||||
public $raw = false;
|
||||
private $_max = 0;
|
||||
private $_last_no = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user