]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/ContentProxy.php
Remove htmlawed and use graby instead
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / ContentProxy.php
index a1df16d8cc4184534c856e5c8124b5a5228368a6..66d72fe61f5444b9258a06e829d3c49a7607e17c 100644 (file)
@@ -47,24 +47,7 @@ class ContentProxy
     {
         // ensure content is a bit cleaned up
         if (!empty($content['html'])) {
-            $extractor = $this->graby->getExtractor();
-            $contentExtracted = $extractor->process($content['html'], $url);
-
-            if ($contentExtracted) {
-                $contentBlock = $extractor->getContent();
-                $contentBlock->normalize();
-
-                $content['html'] = trim($contentBlock->innerHTML);
-            }
-
-            $content['html'] = htmLawed($content['html'], [
-                'safe' => 1,
-                // which means: do not remove iframe elements
-                'elements' => '*+iframe',
-                'deny_attribute' => 'style',
-                'comment' => 1,
-                'cdata' => 1,
-            ]);
+            $content['html'] = $this->graby->cleanupHtml($content['html'], $url);
         }
 
         // do we have to fetch the content or the provided one is ok?