Ok, I've found the problem, though not necessarily an immediate solution. Basically the ESPN feed is formatted in a way that, when the RSS scroller script encodes it so it can be stored as a JavaScript array, then decoding it back on the client side using JavaScript's unescape function, the result is invalid HTML resulting in a blank output. The output is there, it's just that there's some sort of invalid HTML within it that makes the browser show nothing.
The function within scrollerbridge.php that encodes the incoming RSS feed is the following:
Code:
function slashit($what){ //Encode text for storing in JavaScript array
$newstring=str_replace(''', '\'', $what); //replace those half valid apostrophe entities with actual apostrophes
return rawurlencode($newstring);
}
You can try commenting out the "$newstring" line and have the script skip this operation to see if it helps. The result is:
Code:
function slashit($what){ //Encode text for storing in JavaScript array
//$newstring=str_replace(''', '\'', $what); //replace those half valid apostrophe entities with actual apostrophes
return rawurlencode($what);
}
Then again, even if this works, this may cause the output of the other "normal" RSS feeds on your page to become a little wacky. Ultimately I want to update this script to use a different PHP RSS parsing class, from the current LastRSS to Simplepie.org. The later is a lot more versatile and takes care of a lot of encoding problems automatically.
Bookmarks