We need to introduce an optional parameter, and a default value to limit the number of characters. An implementation idea has been posted in 2010 on http://www.mediawiki.org/wiki/Extension_talk:RSS#How_to_modify_the_length_of_the_description.3F and is partially copied here:
How to modify the length of the description?
Something like this:
preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']);Play around with the numbers and you'll see. --Subfader 21:48, 5 March 2010 (UTC)
I changed rss.php a lot so I didn't check it, but it should work like this: Replace
if ( $item['description'] ) { $text = trim( iconv( $charset, $wgOutputEncoding, $item['description'] ) );with
if ( $item['description'] ) { $shortdesc = preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']); $text = trim( iconv( $charset, $wgOutputEncoding, $shortdesc ) );This will shorten the description text to [150 chars ... 25 chars]. --Subfader 19:15, 16 March 2010 (UTC)