Bug 55763

Change-Id: I4329c4e652f3025ddcca4bcd38dedc33b1a378a6
This commit is contained in:
Wikinaut 2013-10-17 23:37:46 +02:00
parent 41f37e726e
commit b1f1e0b517
4 changed files with 29 additions and 26 deletions

View file

@ -1,6 +1,6 @@
RELEASE NOTES of the MediaWiki extension RSS
Version 2.23 20130903
Version 2.24 20131017
Manual http://www.mediawiki.org/wiki/Extension:RSS
@ -27,6 +27,9 @@ git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/RSS.git
The length limitation must be HTML tag-safe, but it is not at the moment.
Length limitation is disabled by default.
=== Version 2.24 2013-10-17 ==
* fix for Bug 55763 Undefined variable: txt in RSSParser.php on line 376
=== Version 2.23 2013-09-03 ===
* Fix parsing from CLI:
removed references to $wgTitle, $wgUser, and $wgLang.

View file

@ -4,7 +4,7 @@
*
* @file
* @ingroup Extensions
* @version 2.22
* @version 2.24
* @author mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, Chris Reigrut, K001
* @author Kellan Elliott-McCrea <kellan@protest.net> -- author of MagpieRSS
* @author Jeroen De Dauw
@ -14,7 +14,7 @@
* @link http://www.mediawiki.org/wiki/Extension:RSS Documentation
*/
define( "EXTENSION_RSS_VERSION", "2.23" );
define( "EXTENSION_RSS_VERSION", "2.24" );
if ( !defined( 'MEDIAWIKI' ) ) {
die( "This is not a valid entry point.\n" );

View file

@ -41,7 +41,7 @@ class RSSData {
* mark up their RSS, some more precautions are
* needed.
*/
$bit[$name] = $n->nodeValue;
$bit[$name] = trim( $n->nodeValue );
}
}
$this->items[] = $bit;

View file

@ -363,6 +363,7 @@ class RSSParser {
// use the overloaded multi byte wrapper functions in GlobalFunctions.php
foreach ( array_keys( $item ) as $info ) {
if ( $item[$info] != "" ) {
switch ( $info ) {
// ATOM <id> elements and RSS <link> elements are item link urls
case 'id':
@ -370,9 +371,7 @@ class RSSParser {
$renderedItem = str_replace( '{{{link}}}', $txt, $renderedItem );
break;
case 'link':
if ( !isset( $item['id'] ) ) {
$txt = $this->sanitizeUrl( $item['link'] );
}
$renderedItem = str_replace( '{{{link}}}', $txt, $renderedItem );
break;
case 'date':
@ -389,6 +388,7 @@ class RSSParser {
$renderedItem = str_replace( '{{{' . $info . '}}}', $parser->insertStripItem( $str ), $renderedItem );
}
}
}
// nullify all remaining info items in the template
// without a corresponding info in the current feed item