]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/WallabagRestController.php
Update url from graby
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / WallabagRestController.php
index 9ca008bfdab5db3b195e7386d55df0bcdef468aa..7452c82af6b86f0b4e65a6e11a59a7feeb36cc70 100644 (file)
@@ -149,7 +149,7 @@ class WallabagRestController extends Controller
         $content = $this->get('wallabag_core.graby')->fetchContent($url);
 
         $entry = new Entry($this->getUser());
-        $entry->setUrl($url);
+        $entry->setUrl($content['url'] ?: $url);
         $entry->setTitle($request->request->get('title') ?: $content['title']);
         $entry->setContent($content['html']);
         $entry->setMimetype($content['content_type']);