diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/util.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index aac095c..e685c06 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -2613,4 +2613,10 @@ function validateipaddr(&$addr, $type, $label, &$err_msg, $alias=false) { return false; } + +/* Replaces the Mac OS 9 and earlier (\r) and DOS/Windows (\r\n) newlines with the Unix equivalent (\n). */ +function unixnewlines($text) { + return preg_replace('/\r\n?/', "\n", $text); +} + ?> |