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 456d93c2..e9b0bf40 100644
--- a/index.php
+++ b/index.php
@@ -1519,7 +1519,7 @@ function renderPage()
1519 1519
1520 // -------- User want to post a new link: Display link edit form. 1520 // -------- User want to post a new link: Display link edit form.
1521 if (isset($_GET['post'])) { 1521 if (isset($_GET['post'])) {
1522 $url = cleanup_url(escape($_GET['post'])); 1522 $url = cleanup_url($_GET['post']);
1523 1523
1524 $link_is_new = false; 1524 $link_is_new = false;
1525 // Check if URL is not already in database (in this case, we will edit the existing link) 1525 // Check if URL is not already in database (in this case, we will edit the existing link)
@@ -1544,8 +1544,8 @@ function renderPage()
1544 // Extract title. 1544 // Extract title.
1545 $title = html_extract_title($content); 1545 $title = html_extract_title($content);
1546 // Re-encode title in utf-8 if necessary. 1546 // Re-encode title in utf-8 if necessary.
1547 if (! empty($title) && $charset != 'utf-8') { 1547 if (! empty($title) && strtolower($charset) != 'utf-8') {
1548 $title = mb_convert_encoding($title, $charset, 'utf-8'); 1548 $title = mb_convert_encoding($title, 'utf-8', $charset);
1549 } 1549 }
1550 } 1550 }
1551 } 1551 }
@@ -1554,6 +1554,8 @@ function renderPage()
1554 $url = '?' . smallHash($linkdate); 1554 $url = '?' . smallHash($linkdate);
1555 $title = 'Note: '; 1555 $title = 'Note: ';
1556 } 1556 }
1557 $url = escape($url);
1558 $title = escape($title);
1557 1559
1558 $link = array( 1560 $link = array(
1559 'linkdate' => $linkdate, 1561 'linkdate' => $linkdate,