forked from blallo/rss-bridge
[FeedExpander] Remove whitespace from source content
Whitespace at the beginning of feeds causes parsing errors. This is an example using an ill-formatted RSS feed: "XML or text declaration not at start of entity" -- https://validator.w3.org This commit automatically removes all proceeding and trailing white- space from the source content before resume parsing.
This commit is contained in:
parent
ff3b1c9eb2
commit
8166e33e7f
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ abstract class FeedExpander extends BridgeAbstract {
|
|||
*/
|
||||
$content = getContents($url)
|
||||
or returnServerError('Could not request ' . $url);
|
||||
$rssContent = simplexml_load_string($content);
|
||||
$rssContent = simplexml_load_string(trim($content));
|
||||
|
||||
debugMessage('Detecting feed format/version');
|
||||
switch(true) {
|
||||
|
|
Loading…
Reference in a new issue