Ajout d'une étape de linting dans DroneCi (#3)
All checks were successful
continuous-integration/drone/push Build is passing

Corrige un doublons laissé par le rebase semi-manuel

Ajout d'une étape de linting dans DroneCi

Fix linting

Co-authored-by: Nigel Sheldon <nigelsheldon@live.fr>
Reviewed-on: https://gitea.nemunai.re/halo-battle/game/pulls/3
This commit is contained in:
Nigel 2020-11-21 18:54:32 +00:00
commit dd61d3b66b
263 changed files with 45327 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: */
?>