summaryrefslogtreecommitdiffstats
path: root/articleenhancer
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-10-20 15:24:33 +0200
committerRobin Appelman <icewind@owncloud.com>2013-10-20 15:24:33 +0200
commit0b5c9ad04441a56d9e0c59fd2c8e9b358056d36e (patch)
tree105d261f447378c87d6b0844582b626afd69d8e6 /articleenhancer
parent782765b75e4a6f8ebaa6d2f7f82731590cb6a1ec (diff)
If the xpath enchancer fails, fallback to the original body
Diffstat (limited to 'articleenhancer')
-rw-r--r--articleenhancer/xpatharticleenhancer.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php
index 93ceaf896..0a2d6e56c 100644
--- a/articleenhancer/xpatharticleenhancer.php
+++ b/articleenhancer/xpatharticleenhancer.php
@@ -86,7 +86,9 @@ class XPathArticleEnhancer implements ArticleEnhancer {
$xpathResult = $this->substituteRelativeLinks($xpathResult, $item->getUrl());
$sanitizedResult = $this->purifier->purify($xpathResult);
- $item->setBody($sanitizedResult);
+ if( $sanitizedResult ) {
+ $item->setBody($sanitizedResult);
+ }
}
}