Fix linting

This commit is contained in:
Nigel Sheldon 2020-11-21 15:51:56 +01:00
commit 1614145b18
262 changed files with 45324 additions and 42695 deletions

View file

@ -32,7 +32,7 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-88
return rawurlencode($string);
case 'urlpathinfo':
return str_replace('%2F','/',rawurlencode($string));
return str_replace('%2F', '/', rawurlencode($string));
case 'quotes':
// escape unescaped single quotes
@ -66,18 +66,17 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-88
case 'mail':
// safe way to display e-mail address on a web page
return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
case 'nonstd':
// escape non-standard chars, such as ms document quotes
$_res = '';
for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
for ($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
$_ord = ord(substr($string, $_i, 1));
// non-standard char, escape it
if($_ord >= 126){
if ($_ord >= 126) {
$_res .= '&#' . $_ord . ';';
}
else {
} else {
$_res .= substr($string, $_i, 1);
}
}
@ -89,5 +88,3 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-88
}
/* vim: set expandtab: */
?>