aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-06-01 22:58:38 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-06-01 22:58:38 +0200
commit9bf7752f73ebfbfea0adbdb0d562a3cfa85039f3 (patch)
tree927d63db163eaa57bfeb16500f1c826601214b47 /src/Wallabag
parentfcad69a427de7ce4f65cbf53bcf778e561959807 (diff)
downloadwallabag-9bf7752f73ebfbfea0adbdb0d562a3cfa85039f3.tar.gz
wallabag-9bf7752f73ebfbfea0adbdb0d562a3cfa85039f3.tar.zst
wallabag-9bf7752f73ebfbfea0adbdb0d562a3cfa85039f3.zip
CS
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Helper/DownloadImages.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php
index f7c26a38..54e23a05 100644
--- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php
+++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php
@@ -54,7 +54,7 @@ class DownloadImages
54 $crawler = new Crawler($html); 54 $crawler = new Crawler($html);
55 $result = $crawler 55 $result = $crawler
56 ->filterXpath('//img') 56 ->filterXpath('//img')
57 ->extract(array('src')); 57 ->extract(['src']);
58 58
59 $relativePath = $this->getRelativePath($entryId); 59 $relativePath = $this->getRelativePath($entryId);
60 60
@@ -66,8 +66,7 @@ class DownloadImages
66 continue; 66 continue;
67 } 67 }
68 68
69 // if image contains "&"" and we can't find it in the html 69 // if image contains "&" and we can't find it in the html it might be because it's encoded as &amp;
70 // it might be because it's encoded as &amp;
71 if (false !== stripos($image, '&') && false === stripos($html, $image)) { 70 if (false !== stripos($image, '&') && false === stripos($html, $image)) {
72 $image = str_replace('&', '&amp;', $image); 71 $image = str_replace('&', '&amp;', $image);
73 } 72 }