aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam+github@flibidi.net>2017-08-27 13:15:43 +0200
committerGitHub <noreply@github.com>2017-08-27 13:15:43 +0200
commitfc27141cf6eb04d3d8714385cb6961a8063fe61b (patch)
treead53c0bc070b7cb0664b5cfb2ae3e3e72f45fa1f /index.php
parente8cef3ac43d5a50485c72ea2e8267e92b00be609 (diff)
parentc27f2f36f228240d50b55d36fe97f0ba7833bc77 (diff)
downloadShaarli-fc27141cf6eb04d3d8714385cb6961a8063fe61b.tar.gz
Shaarli-fc27141cf6eb04d3d8714385cb6961a8063fe61b.tar.zst
Shaarli-fc27141cf6eb04d3d8714385cb6961a8063fe61b.zip
Merge pull request #940 from ArthurHoaro/hotfix/empty-urls
Generates a permalink URL if the URL is set to blank
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.php b/index.php
index c9bbfce5..7df6d819 100644
--- a/index.php
+++ b/index.php
@@ -1248,6 +1248,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
1248 // Remove duplicates. 1248 // Remove duplicates.
1249 $tags = implode(' ', array_unique(explode(' ', $tags))); 1249 $tags = implode(' ', array_unique(explode(' ', $tags)));
1250 1250
1251 if (empty(trim($_POST['lf_url']))) {
1252 $_POST['lf_url'] = '?' . smallHash($linkdate . $id);
1253 }
1251 $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols')); 1254 $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols'));
1252 1255
1253 $link = array( 1256 $link = array(