diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-08-25 20:08:07 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-08-25 20:08:07 +0200 |
commit | c27f2f36f228240d50b55d36fe97f0ba7833bc77 (patch) | |
tree | c1b7e5797c8d17e9f9798de556fbbc8c6fde09f5 | |
parent | 2a1292359b79ec77257583ea9d97891dfd2ddb1b (diff) | |
download | Shaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.tar.gz Shaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.tar.zst Shaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.zip |
Generates a permalinks URL if the URL is set to blank
Fixes #926
-rw-r--r-- | index.php | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1256,6 +1256,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1256 | // Remove duplicates. | 1256 | // Remove duplicates. |
1257 | $tags = implode(' ', array_unique(explode(' ', $tags))); | 1257 | $tags = implode(' ', array_unique(explode(' ', $tags))); |
1258 | 1258 | ||
1259 | if (empty(trim($_POST['lf_url']))) { | ||
1260 | $_POST['lf_url'] = '?' . smallHash($linkdate . $id); | ||
1261 | } | ||
1259 | $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols')); | 1262 | $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols')); |
1260 | 1263 | ||
1261 | $link = array( | 1264 | $link = array( |