diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2005-03-08 02:50:31 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2005-03-08 02:50:31 +0000 |
commit | 63cf8398ba0d61a85348e79322e9630cf9264450 (patch) | |
tree | 332858656a1ed50fc3f9b3633fef0ab08b5a590a /includes | |
parent | 4049a9d9e16dcd5b8c5af55b3e019a2551912c05 (diff) | |
download | mediawikicore-63cf8398ba0d61a85348e79322e9630cf9264450.tar.gz mediawikicore-63cf8398ba0d61a85348e79322e9630cf9264450.zip |
* Trim old illegal characters from syndication feeds
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/7610
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Feed.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/Feed.php b/includes/Feed.php index c3cd3711a29f..e737a76ad333 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 ); } |