Update Smarty und RedBean
Smarty: 3.1.30 - Redbean: 5.0.0
This commit is contained in:
parent
eb0835ff74
commit
0795a87ecd
193 changed files with 22035 additions and 14455 deletions
|
@ -66,7 +66,8 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
|
|||
// php <5.2.3 - prevent double encoding
|
||||
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
|
||||
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
|
||||
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
|
||||
$string =
|
||||
str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
@ -107,7 +108,7 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
|
|||
$return = '';
|
||||
$_length = strlen($string);
|
||||
for ($x = 0; $x < $_length; $x ++) {
|
||||
$return .= '%' . bin2hex($string[$x]);
|
||||
$return .= '%' . bin2hex($string[ $x ]);
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -126,7 +127,7 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
|
|||
// no MBString fallback
|
||||
$_length = strlen($string);
|
||||
for ($x = 0; $x < $_length; $x ++) {
|
||||
$return .= '&#x' . bin2hex($string[$x]) . ';';
|
||||
$return .= '&#x' . bin2hex($string[ $x ]) . ';';
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -145,14 +146,15 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
|
|||
// no MBString fallback
|
||||
$_length = strlen($string);
|
||||
for ($x = 0; $x < $_length; $x ++) {
|
||||
$return .= '&#' . ord($string[$x]) . ';';
|
||||
$return .= '&#' . ord($string[ $x ]) . ';';
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
||||
case 'javascript':
|
||||
// escape quotes and backslashes, newlines, etc.
|
||||
return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
|
||||
return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n',
|
||||
'</' => '<\/'));
|
||||
|
||||
case 'mail':
|
||||
if (Smarty::$_MBSTRING) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue