From: Brion Vibber Date: Tue, 8 Mar 2005 02:50:31 +0000 (+0000) Subject: * Trim old illegal characters from syndication feeds X-Git-Tag: 1.5.0alpha1~665 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=63cf8398ba0d61a85348e79322e9630cf9264450;p=lhc%2Fweb%2Fwiklou.git * Trim old illegal characters from syndication feeds --- diff --git a/includes/Feed.php b/includes/Feed.php index c3cd3711a2..e737a76ad3 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -61,6 +61,7 @@ class FeedItem { function xmlEncode( $string ) { global $wgInputEncoding, $wgContLang; $string = str_replace( "\r\n", "\n", $string ); + $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string ); if( strcasecmp( $wgInputEncoding, 'utf-8' ) != 0 ) { $string = $wgContLang->iconv( $wgInputEncoding, 'utf-8', $string ); }