Merge pull request #940 from ArthurHoaro/hotfix/empty-urls

Generates a permalink URL if the URL is set to blank
This commit is contained in:
VirtualTam 2017-08-27 13:15:43 +02:00 committed by GitHub
commit fc27141cf6
1 changed files with 3 additions and 0 deletions

View File

@ -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(