diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2017-08-27 13:15:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-27 13:15:43 +0200 |
commit | fc27141cf6eb04d3d8714385cb6961a8063fe61b (patch) | |
tree | ad53c0bc070b7cb0664b5cfb2ae3e3e72f45fa1f /index.php | |
parent | e8cef3ac43d5a50485c72ea2e8267e92b00be609 (diff) | |
parent | c27f2f36f228240d50b55d36fe97f0ba7833bc77 (diff) | |
download | Shaarli-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.php | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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( |