solved bug reported by Thomas: windows newline is **\r\n"** and not the other way around!!

This commit is contained in:
Martin Monperrus
2010-07-01 09:56:57 +02:00
parent c69d952d09
commit b4bfbbbe6c
+4 -1
View File
@@ -675,7 +675,10 @@ function xtrim($line) {
$line = trim($line); $line = trim($line);
// we remove the unneeded line breaks // we remove the unneeded line breaks
// this is *required* to correctly split author lists into names // this is *required* to correctly split author lists into names
$line = str_replace("\n\r",' ', $line);//windows like // 2010-06-30
// bug found by Thomas
// windows new line is **\r\n"** and not the other way around!!
$line = str_replace("\r\n",' ', $line);//windows like
$line = str_replace("\n",' ', $line);//unix-like $line = str_replace("\n",' ', $line);//unix-like
// we also replace tabs // we also replace tabs
$line = str_replace("\t",' ', $line); $line = str_replace("\t",' ', $line);