X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=8f0bd4b92df1f761a1973f7bc435834c254dbb92;hb=739dc2434424cf8d420dda648efcb9ad690bdc6e;hp=b06dd50ce0a1e957cc530affeaf5ac041287f6c3;hpb=a7921b2445f5a7f13a09290b2a66c5bee82265d2;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index b06dd50c..8f0bd4b9 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ /shaarli/ define('WEB_PATH', substr($_SERVER["REQUEST_URI"], 0, 1+strrpos($_SERVER["REQUEST_URI"], '/', 0))); @@ -1611,11 +1611,11 @@ function renderPage() $link_is_new = true; $linkdate = strval(date('Ymd_His')); // Get title if it was provided in URL (by the bookmarklet). - $title = (empty($_GET['title']) ? '' : $_GET['title'] ); + $title = empty($_GET['title']) ? '' : escape($_GET['title']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that] - $description = (empty($_GET['description']) ? '' : $_GET['description']); - $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); - $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); + $description = empty($_GET['description']) ? '' : escape($_GET['description']); + $tags = empty($_GET['tags']) ? '' : escape($_GET['tags']); + $private = !empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0; // 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.) if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { // Short timeout to keep the application responsive