diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-11-08 18:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-08 18:54:32 +0100 |
commit | b14d34d2c7b7a7360adcc823472a43f64b579e1c (patch) | |
tree | 3e9cf5757246945a499fdc45d45820021c04e2ce /index.php | |
parent | e813f97b1af314e9391e6d4e734dc7cca5b0bc2c (diff) | |
parent | fd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f (diff) | |
download | Shaarli-b14d34d2c7b7a7360adcc823472a43f64b579e1c.tar.gz Shaarli-b14d34d2c7b7a7360adcc823472a43f64b579e1c.tar.zst Shaarli-b14d34d2c7b7a7360adcc823472a43f64b579e1c.zip |
Merge pull request #1012 from ArthurHoaro/hotfix/urlencode
Don't URL encode description links if parameter 'redirector.encode_url' is set to false
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -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(); |