$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']);
if ($form->isValid()) {
$content = $this->get('wallabag_core.graby')->fetchContent($entry->getUrl());
+ $entry->setUrl($content['url'] ?: $entry->getUrl());
$entry->setTitle($content['title']);
$entry->setContent($content['html']);
$entry->setMimetype($content['content_type']);