summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien mudry <julien.mudry+git@gmail.com>2013-06-02 09:27:33 +0200
committerjulien mudry <julien.mudry+git@gmail.com>2013-06-02 09:27:33 +0200
commitaefbf4fa8a1eb425cd107752a9ff08d7acc4289d (patch)
tree59dcab04b77bd3fd93e3d6a600549ad3d30c966e
parent8bbaa1c34474371d963a579b544268dc61884af3 (diff)
downloadyafpp-aefbf4fa8a1eb425cd107752a9ff08d7acc4289d.tar.gz
yafpp-aefbf4fa8a1eb425cd107752a9ff08d7acc4289d.zip
Added support for article links having whitespace around the link.
-rw-r--r--init.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/init.php b/init.php
index 070fcbf..3b65ce3 100644
--- a/init.php
+++ b/init.php
@@ -71,13 +71,14 @@ class Af_Feedmod extends Plugin implements IHandler
switch ($config['type']) {
case 'xpath':
$doc = new DOMDocument();
+ $link = trim($article['link']);
if (version_compare(VERSION, '1.7.9', '>=')) {
- $html = fetch_file_contents($article['link']);
+ $html = fetch_file_contents($link);
$content_type = $fetch_last_content_type;
} else {
// fallback to file_get_contents()
- $html = file_get_contents($article['link']);
+ $html = file_get_contents($link);
// try to fetch charset from HTTP headers
$headers = $http_response_header;