From 90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 18 Sep 2015 13:26:36 +0200 Subject: URL encode links when a redirector is set. Fixes #328 - URL encode links when a redirector is set * WARNING - template edit - new variable available : "real_url" Contains the final real url (redirected or any other change on original URL) * Don't redirect shaares link in RSS/Atom. * Affects links shaared in description. * Move text2clickable and keepMultipleSpaces to Utils.php + unit test UPDATE: * keepMultipleSpaces renamed to space2nbsp * space2nbsp improved to handle single space at line beginning * links in text description aren't 'nofollow' anymore --- tpl/daily.html | 2 +- tpl/linklist.html | 6 ++++-- tpl/picwall.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tpl') diff --git a/tpl/daily.html b/tpl/daily.html index 93a3ab45..063dc89a 100644 --- a/tpl/daily.html +++ b/tpl/daily.html @@ -66,7 +66,7 @@ {/if}
- {$link.title} + {$link.title}
{if="$link.thumbnail"}
{$link.thumbnail}
diff --git a/tpl/linklist.html b/tpl/linklist.html index f6e9e82b..666748a7 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html @@ -70,7 +70,9 @@ {/if} - {$value.title} + + {$value.title} +
{if="$value.description"}
{$value.description}
{/if} {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"} @@ -83,7 +85,7 @@ {$value} - {/loop} - {$value.url}
+ {$value.url}
{if="$value.tags"}
{loop="value.taglist"}{$value} {/loop} diff --git a/tpl/picwall.html b/tpl/picwall.html index 97d5efdf..230c948b 100644 --- a/tpl/picwall.html +++ b/tpl/picwall.html @@ -16,7 +16,7 @@
{loop="linksToDisplay"}
- {$value.thumbnail}{$value.title} + {$value.thumbnail}{$value.title} {loop="$value.picwall_plugin"} {$value} {/loop} -- cgit v1.2.3