]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Merge pull request #940 from ArthurHoaro/hotfix/empty-urls
[github/shaarli/Shaarli.git] / index.php
index c9bbfce5ac8587076f66d926ebe8ae6a7a512756..7df6d819ef4edc12ad95e66e659c21897beb88e3 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1248,6 +1248,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
         // Remove duplicates.
         $tags = implode(' ', array_unique(explode(' ', $tags)));
 
+        if (empty(trim($_POST['lf_url']))) {
+            $_POST['lf_url'] = '?' . smallHash($linkdate . $id);
+        }
         $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols'));
 
         $link = array(