From: Brion Vibber Date: Fri, 3 Sep 2004 06:44:57 +0000 (+0000) Subject: Correction to the \r stripping X-Git-Tag: 1.5.0alpha1~2149 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=9857a47c3fa2faa3eb09fffa1fb3fb24ab182cb9;p=lhc%2Fweb%2Fwiklou.git Correction to the \r stripping --- diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php index 3ccae670d0..5ccdf0cde7 100644 --- a/includes/normal/UtfNormal.php +++ b/includes/normal/UtfNormal.php @@ -217,10 +217,12 @@ class UtfNormal { } if( $n < 0x09 ) { $out .= UTF8_REPLACEMENT; - } elseif( $n < 0x0b ) { + } elseif( $n == 0x0a ) { $out .= $c; - } elseif( $n == 0x0c ) { - # Strip \r + } elseif( $n < 0x0d ) { + $out .= UTF8_REPLACEMENT; + } elseif( $n == 0x0d ) { + # Strip \r silently } elseif( $n < 0x20 ) { $out .= UTF8_REPLACEMENT; } elseif( $n < 0x80 ) {