diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2017-02-01 23:39:34 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2017-02-02 21:54:15 +0100 |
commit | 1bb7bdc8b399abe573dfa4e2c04fafa19991c487 (patch) | |
tree | 5c43340eeefe9999df3d9fd29d4c127e072a474a /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig | |
parent | 8a098044bfbe00fa2bd08b01a6d19871b03f28b7 (diff) | |
download | wallabag-1bb7bdc8b399abe573dfa4e2c04fafa19991c487.tar.gz wallabag-1bb7bdc8b399abe573dfa4e2c04fafa19991c487.tar.zst wallabag-1bb7bdc8b399abe573dfa4e2c04fafa19991c487.zip |
Fix rendering of entry title in Twig views
This commit provides some improvements on the rendering of entry title
on entries list and entry views and refactors filter calls:
- Remove escape filter from apparent title, striptags is enough
- Move raw filter to the end of apparent title as it's ignored if not
placed as the last filter
- Replace raw filter with e('html_attr') for title used in attributes,
fixing possible issue and/or glitch
- Add striptags to entry.title used for link sharing to respect the
apparent title
Fixes #2802
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig index ed916e79..eb158659 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig | |||
@@ -2,8 +2,8 @@ | |||
2 | <div class="card-body"> | 2 | <div class="card-body"> |
3 | <div class="card-content"> | 3 | <div class="card-content"> |
4 | <span class="card-title dot-ellipsis dot-resize-update"> | 4 | <span class="card-title dot-ellipsis dot-resize-update"> |
5 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | e | raw | striptags }}"> | 5 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> |
6 | {{ entry.title | e | raw | striptags | truncate(80, true, '…') }} | 6 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} |
7 | </a> | 7 | </a> |
8 | </span> | 8 | </span> |
9 | 9 | ||