mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-06 21:44:17 +02:00
2289fa69f1
* Evolution of auto-escaping: no double-escaping when using the 'escape' modifier; add the 'force' mode to the 'escape' modifier; add the 'raw' modifier. * Add 'raw' modifier's documentation --------- Co-authored-by: Simon Wisselink <s.wisselink@iwink.nl>
22 lines
436 B
PHP
22 lines
436 B
PHP
<?php
|
|
namespace Smarty\Compile\Modifier;
|
|
|
|
use Smarty\Exception;
|
|
|
|
/**
|
|
* Smarty raw modifier plugin
|
|
* Type: modifier
|
|
* Name: raw
|
|
* Purpose: when escaping is enabled by default, generates a raw output of a variable
|
|
*
|
|
* @author Amaury Bouchard
|
|
*/
|
|
|
|
class RawModifierCompiler extends Base {
|
|
|
|
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
|
$compiler->setRawOutput(true);
|
|
return ($params[0]);
|
|
}
|
|
}
|