Compare commits
No commits in common. "3bcd5c978065509719265a84015d01a75d08eada" and "5182ba19bc1f000460ff0a5b96540e4a2204b3d1" have entirely different histories.
3bcd5c9780
...
5182ba19bc
@ -6,7 +6,7 @@ use Picea\Compiler\Context;
|
|||||||
|
|
||||||
class PrintExtension implements Extension {
|
class PrintExtension implements Extension {
|
||||||
|
|
||||||
public array $token = [ "echo", "print", "printf", "no_html" ];
|
public array $token = [ "echo", "print", "printf" ];
|
||||||
|
|
||||||
public int $flag = \ENT_QUOTES;
|
public int $flag = \ENT_QUOTES;
|
||||||
|
|
||||||
@ -35,10 +35,6 @@ class PrintExtension implements Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "<?php echo htmlspecialchars(sprintf((string) $arguments), {$this->flag}, '{$this->encoding}', " . ($this->doubleEncode ? "true" : "false") . ") ?>";
|
return "<?php echo htmlspecialchars(sprintf((string) $arguments), {$this->flag}, '{$this->encoding}', " . ($this->doubleEncode ? "true" : "false") . ") ?>";
|
||||||
|
|
||||||
case 'no_html':
|
|
||||||
return "<?php echo nl2br(strip_tags((string) $arguments)) ?>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user