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
This commit is contained in:
parent
986afb752b
commit
90e5bd65c9
10 changed files with 160 additions and 37 deletions
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
<div class="dailyEntryTitle">
|
||||
<a href="{$link.url}">{$link.title}</a>
|
||||
<a href="{$link.real_url}">{$link.title}</a>
|
||||
</div>
|
||||
{if="$link.thumbnail"}
|
||||
<div class="dailyEntryThumbnail">{$link.thumbnail}</div>
|
||||
|
|
|
@ -70,7 +70,9 @@
|
|||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
<span class="linktitle"><a href="{$redirector}{$value.url}">{$value.title}</a></span>
|
||||
<span class="linktitle">
|
||||
<a href="{$value.real_url}">{$value.title}</a>
|
||||
</span>
|
||||
<br>
|
||||
{if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if}
|
||||
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
|
||||
|
@ -83,7 +85,7 @@
|
|||
<span>{$value}</span> -
|
||||
{/loop}
|
||||
|
||||
<a href="{$value.url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
|
||||
<a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
|
||||
{if="$value.tags"}
|
||||
<div class="linktaglist">
|
||||
{loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value}</a></span> {/loop}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div id="picwall_container">
|
||||
{loop="linksToDisplay"}
|
||||
<div class="picwall_pictureframe">
|
||||
{$value.thumbnail}<a href="{$value.url}"><span class="info">{$value.title}</span></a>
|
||||
{$value.thumbnail}<a href="{$value.real_url}"><span class="info">{$value.title}</span></a>
|
||||
{loop="$value.picwall_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue