From 5f85fcd863fe261921953ea3bd1742f3e1b7cf68 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 11 Jun 2015 13:53:27 +0200 Subject: Working on shaarli/Shaarli#224 I reviewed character escaping everywhere with the following ideas: * use a single common function to escape user data: `escape` using `htmlspecialchars`. * sanitize fields in `index.php` after reading them from datastore and before sending them to templates. It means no escaping function in Twig templates. 2 reasons: * it reduces risks of security issue for future user made templates * more readable templates * sanitize user configuration fields after loading them. --- tpl/linklist.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tpl/linklist.html') diff --git a/tpl/linklist.html b/tpl/linklist.html index a59a9e51..daf87060 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html @@ -33,7 +33,7 @@ {if="$search_type=='tags'"}
{$result_count} results for tags {loop="search_crits"} - {$value|htmlspecialchars} x + {$value} x {/loop}
{/if} {/if} @@ -50,7 +50,7 @@ {/if} - {$value.title|htmlspecialchars} + {$value.title}
{if="$value.description"}
{$value.description}
{/if} {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"} @@ -59,15 +59,15 @@ permalink - {/if} {if="$GLOBALS['config']['ARCHIVE_ORG']"} - archive - + archive - {/if}
QR-Code
- - {$value.url|htmlspecialchars}
+ {$value.url}
{if="$value.tags"}
- {loop="value.taglist"}{$value|htmlspecialchars} {/loop} + {loop="value.taglist"}{$value} {/loop}
{/if} -- cgit v1.2.3