From 63cf8398ba0d61a85348e79322e9630cf9264450 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 8 Mar 2005 02:50:31 +0000 Subject: [PATCH] * Trim old illegal characters from syndication feeds --- includes/Feed.php | 1 + 1 file changed, 1 insertion(+) 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 ); } -- 2.20.1