aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2015-11-22 18:10:50 +0100
committerVirtualTam <virtualtam@flibidi.net>2015-11-22 18:10:50 +0100
commit3d79d823263d1c40b046fe8d3f60f85b09f05e97 (patch)
treecd9e6d0ffd3ad23996aaef0eeae4324b5b702d6e
parentc07e166aa265184db16e8c82ce18a98596cfb3c9 (diff)
parent739dc2434424cf8d420dda648efcb9ad690bdc6e (diff)
downloadShaarli-3d79d823263d1c40b046fe8d3f60f85b09f05e97.tar.gz
Shaarli-3d79d823263d1c40b046fe8d3f60f85b09f05e97.tar.zst
Shaarli-3d79d823263d1c40b046fe8d3f60f85b09f05e97.zip
Merge pull request #387 from ArthurHoaro/bookmarklet-quote
Fixes #382: Bookmarklet can not retrieve title when there is a quotation mark in it
-rw-r--r--index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.php b/index.php
index 0a64ca21..8eda9880 100644
--- a/index.php
+++ b/index.php
@@ -1619,11 +1619,11 @@ function renderPage()
1619 $link_is_new = true; 1619 $link_is_new = true;
1620 $linkdate = strval(date('Ymd_His')); 1620 $linkdate = strval(date('Ymd_His'));
1621 // Get title if it was provided in URL (by the bookmarklet). 1621 // Get title if it was provided in URL (by the bookmarklet).
1622 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); 1622 $title = empty($_GET['title']) ? '' : escape($_GET['title']);
1623 // Get description if it was provided in URL (by the bookmarklet). [Bronco added that] 1623 // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
1624 $description = (empty($_GET['description']) ? '' : $_GET['description']); 1624 $description = empty($_GET['description']) ? '' : escape($_GET['description']);
1625 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); 1625 $tags = empty($_GET['tags']) ? '' : escape($_GET['tags']);
1626 $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); 1626 $private = !empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0;
1627 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.) 1627 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
1628 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { 1628 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) {
1629 // Short timeout to keep the application responsive 1629 // Short timeout to keep the application responsive