mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Remove nodouble option and make it the default behavior
This commit is contained in:
parent
bd365c7ff1
commit
d0addddbec
1 changed files with 2 additions and 4 deletions
|
|
@ -602,7 +602,7 @@ class TemplateHandler
|
|||
else
|
||||
{
|
||||
$escape_option = $this->config->autoescape !== null ? 'auto' : 'noescape';
|
||||
if(preg_match('@^(.+)\\|((?:no)?escape|nodouble)$@', $m[1], $mm))
|
||||
if(preg_match('@^(.+)\\|((?:no)?escape)$@', $m[1], $mm))
|
||||
{
|
||||
$m[1] = $mm[1];
|
||||
$escape_option = $mm[2];
|
||||
|
|
@ -611,13 +611,11 @@ class TemplateHandler
|
|||
switch($escape_option)
|
||||
{
|
||||
case 'auto':
|
||||
return "<?php echo (\$this->config->autoescape === 'on' ? htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', true) : {$m[1]}) ?>";
|
||||
return "<?php echo (\$this->config->autoescape === 'on' ? htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', false) : {$m[1]}) ?>";
|
||||
case 'escape':
|
||||
return "<?php echo htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', true) ?>";
|
||||
case 'noescape':
|
||||
return "<?php echo {$m[1]} ?>";
|
||||
case 'nodouble':
|
||||
return "<?php echo htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', false) ?>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue