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_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_preview.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index d23be4d0..fb5301c8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig | |||
@@ -13,8 +13,8 @@ | |||
13 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | 13 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> |
14 | 14 | ||
15 | <span class="card-title dot-ellipsis dot-resize-update"> | 15 | <span class="card-title dot-ellipsis dot-resize-update"> |
16 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | e | raw | striptags }}"> | 16 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> |
17 | {{ entry.title | e | striptags | truncate(80, true, '…') | raw }} | 17 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} |
18 | </a> | 18 | </a> |
19 | </span> | 19 | </span> |
20 | 20 | ||
@@ -29,8 +29,8 @@ | |||
29 | <div class="card-reveal"> | 29 | <div class="card-reveal"> |
30 | <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i> | 30 | <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i> |
31 | <span class="card-title"> | 31 | <span class="card-title"> |
32 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | e | raw | striptags }}"> | 32 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> |
33 | {{ entry.title | e | raw | striptags | truncate(80, true, '…') }} | 33 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} |
34 | </a> | 34 | </a> |
35 | </span> | 35 | </span> |
36 | 36 | ||