From 26c503460cd2b50c2c122dba73d62e09ee04b9c8 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 31 Aug 2015 12:27:56 +0200 Subject: [PATCH] Add HTTPS support for title extracting feature --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index ba70b29..9c3f7c1 100755 --- a/index.php +++ b/index.php @@ -1497,8 +1497,8 @@ function renderPage() $description = (empty($_GET['description']) ? '' : $_GET['description']); $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); - // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.) - if (empty($title) && $url->getScheme() == 'http') { + // 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($url->getScheme(), 'http') !== false) { list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. // FIXME: Decode charset according to specified in either 1) HTTP response headers or 2) in html if (strpos($status,'200 OK')!==false) {