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
|
* Output the value
|
||||||
*
|
*
|
||||||
* @param $data
|
* @param $data
|
||||||
* @param $tag
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function _print($data, $tag) {
|
private function _print($data) {
|
||||||
if($this->_options & Fenom::AUTO_ESCAPE && !$tag->raw) {
|
if($this->_options & Fenom::AUTO_ESCAPE) {
|
||||||
return "echo htmlspecialchars($data, ENT_COMPAT, 'UTF-8')";
|
return "echo htmlspecialchars($data, ENT_COMPAT, 'UTF-8')";
|
||||||
} else {
|
} else {
|
||||||
return "echo $data";
|
return "echo $data";
|
||||||
@ -883,11 +882,6 @@ class Template extends Render {
|
|||||||
while($tokens->is("|")) {
|
while($tokens->is("|")) {
|
||||||
$mods = $this->_fenom->getModifier( $modifier_name = $tokens->getNext(Tokenizer::MACRO_STRING) );
|
$mods = $this->_fenom->getModifier( $modifier_name = $tokens->getNext(Tokenizer::MACRO_STRING) );
|
||||||
|
|
||||||
if($modifier_name == "raw") {
|
|
||||||
$tokens->raw = false;
|
|
||||||
$tokens->next();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$tokens->next();
|
$tokens->next();
|
||||||
$args = array();
|
$args = array();
|
||||||
|
|
||||||
|
@ -81,7 +81,6 @@ class Tokenizer {
|
|||||||
public $tokens;
|
public $tokens;
|
||||||
public $p = 0;
|
public $p = 0;
|
||||||
public $quotes = 0;
|
public $quotes = 0;
|
||||||
public $raw = false;
|
|
||||||
private $_max = 0;
|
private $_max = 0;
|
||||||
private $_last_no = 0;
|
private $_last_no = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user