aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-11-07 20:23:58 +0100
committerArthurHoaro <arthur@hoa.ro>2017-11-07 20:23:58 +0100
commitfd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f (patch)
treeac75653241dec9fbdc0c66dfa14181b13d4a0dba /index.php
parentd12b2a08c886a652d1edbacb287788814a8ef7f1 (diff)
downloadShaarli-fd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f.tar.gz
Shaarli-fd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f.tar.zst
Shaarli-fd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f.zip
Don't URL encode description links if parameter 'redirector.encode_url' is set to false
Diffstat (limited to 'index.php')
-rw-r--r--index.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/index.php b/index.php
index e1516d37..9d5f25ea 100644
--- a/index.php
+++ b/index.php
@@ -526,7 +526,11 @@ function showDailyRSS($conf) {
526 526
527 // We pre-format some fields for proper output. 527 // We pre-format some fields for proper output.
528 foreach ($links as &$link) { 528 foreach ($links as &$link) {
529 $link['formatedDescription'] = format_description($link['description'], $conf->get('redirector.url')); 529 $link['formatedDescription'] = format_description(
530 $link['description'],
531 $conf->get('redirector.url'),
532 $conf->get('redirector.encode_url')
533 );
530 $link['thumbnail'] = thumbnail($conf, $link['url']); 534 $link['thumbnail'] = thumbnail($conf, $link['url']);
531 $link['timestamp'] = $link['created']->getTimestamp(); 535 $link['timestamp'] = $link['created']->getTimestamp();
532 if (startsWith($link['url'], '?')) { 536 if (startsWith($link['url'], '?')) {
@@ -598,7 +602,11 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager)
598 $taglist = explode(' ',$link['tags']); 602 $taglist = explode(' ',$link['tags']);
599 uasort($taglist, 'strcasecmp'); 603 uasort($taglist, 'strcasecmp');
600 $linksToDisplay[$key]['taglist']=$taglist; 604 $linksToDisplay[$key]['taglist']=$taglist;
601 $linksToDisplay[$key]['formatedDescription'] = format_description($link['description'], $conf->get('redirector.url')); 605 $linksToDisplay[$key]['formatedDescription'] = format_description(
606 $link['description'],
607 $conf->get('redirector.url'),
608 $conf->get('redirector.encode_url')
609 );
602 $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']); 610 $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']);
603 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp(); 611 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp();
604 } 612 }
@@ -1688,7 +1696,11 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1688 while ($i<$end && $i<count($keys)) 1696 while ($i<$end && $i<count($keys))
1689 { 1697 {
1690 $link = $linksToDisplay[$keys[$i]]; 1698 $link = $linksToDisplay[$keys[$i]];
1691 $link['description'] = format_description($link['description'], $conf->get('redirector.url')); 1699 $link['description'] = format_description(
1700 $link['description'],
1701 $conf->get('redirector.url'),
1702 $conf->get('redirector.encode_url')
1703 );
1692 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight'; 1704 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
1693 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 1705 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
1694 $link['timestamp'] = $link['created']->getTimestamp(); 1706 $link['timestamp'] = $link['created']->getTimestamp();