aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/index.php b/index.php
index dfc00fbd..41a42cf6 100644
--- a/index.php
+++ b/index.php
@@ -1516,7 +1516,7 @@ function renderPage()
1516 1516
1517 // -------- User want to post a new link: Display link edit form. 1517 // -------- User want to post a new link: Display link edit form.
1518 if (isset($_GET['post'])) { 1518 if (isset($_GET['post'])) {
1519 $url = cleanup_url(escape($_GET['post'])); 1519 $url = cleanup_url($_GET['post']);
1520 1520
1521 $link_is_new = false; 1521 $link_is_new = false;
1522 // Check if URL is not already in database (in this case, we will edit the existing link) 1522 // Check if URL is not already in database (in this case, we will edit the existing link)
@@ -1541,8 +1541,8 @@ function renderPage()
1541 // Extract title. 1541 // Extract title.
1542 $title = html_extract_title($content); 1542 $title = html_extract_title($content);
1543 // Re-encode title in utf-8 if necessary. 1543 // Re-encode title in utf-8 if necessary.
1544 if (! empty($title) && $charset != 'utf-8') { 1544 if (! empty($title) && strtolower($charset) != 'utf-8') {
1545 $title = mb_convert_encoding($title, $charset, 'utf-8'); 1545 $title = mb_convert_encoding($title, 'utf-8', $charset);
1546 } 1546 }
1547 } 1547 }
1548 } 1548 }
@@ -1551,6 +1551,8 @@ function renderPage()
1551 $url = '?' . smallHash($linkdate); 1551 $url = '?' . smallHash($linkdate);
1552 $title = 'Note: '; 1552 $title = 'Note: ';
1553 } 1553 }
1554 $url = escape($url);
1555 $title = escape($title);
1554 1556
1555 $link = array( 1557 $link = array(
1556 'linkdate' => $linkdate, 1558 'linkdate' => $linkdate,