aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php1
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index e6bbe552..0930c109 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -336,7 +336,6 @@ class EntryRestController extends WallabagRestController
336 $entry->setUrl($url); 336 $entry->setUrl($url);
337 } 337 }
338 338
339
340 if (!empty($tags)) { 339 if (!empty($tags)) {
341 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags); 340 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
342 } 341 }
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index e06ad3d6..a1df16d8 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -47,6 +47,16 @@ class ContentProxy
47 { 47 {
48 // ensure content is a bit cleaned up 48 // ensure content is a bit cleaned up
49 if (!empty($content['html'])) { 49 if (!empty($content['html'])) {
50 $extractor = $this->graby->getExtractor();
51 $contentExtracted = $extractor->process($content['html'], $url);
52
53 if ($contentExtracted) {
54 $contentBlock = $extractor->getContent();
55 $contentBlock->normalize();
56
57 $content['html'] = trim($contentBlock->innerHTML);
58 }
59
50 $content['html'] = htmLawed($content['html'], [ 60 $content['html'] = htmLawed($content['html'], [
51 'safe' => 1, 61 'safe' => 1,
52 // which means: do not remove iframe elements 62 // which means: do not remove iframe elements