X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUtils.php;h=10d606987c826990e94fad0489f36aad66f6a969;hb=bedd176a5406003631da42366736fd5ebae29135;hp=cb30595f13cac0c977ce2aa0f7cdf554d345a3fe;hpb=122d90ef8d83c6702a8b47f81c32fa3ba7a53c31;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Utils.php b/application/Utils.php index cb30595f..10d60698 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -16,7 +16,7 @@ function logm($logFile, $clientIp, $message) { file_put_contents( $logFile, - date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).'\n', + date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).PHP_EOL, FILE_APPEND ); } @@ -61,14 +61,6 @@ function endsWith($haystack, $needle, $case=true) return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)), $needle) === 0); } -/** - * Same as nl2br(), but escapes < and > - */ -function nl2br_escaped($html) -{ - return str_replace('>', '>', str_replace('<', '<', nl2br($html))); -} - /** * htmlspecialchars wrapper */