Skip to content

Commit a4635e2

Browse files
author
Nicolas Harraudeau
committed
global: fix flash message CSS class bug
* Fix bug introduced by ecb6d6e. CSS class of 'html_safe' flash messages where not displayed properly. Signed-off-by: Nicolas Harraudeau <nicolas.harraudeau@cern.ch>
1 parent bf14781 commit a4635e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

invenio/base/templates/_macros.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'(html_safe)', 'info(html_safe)', 'danger(html_safe)', 'error(html_safe)',
2525
'warning(html_safe)', 'success(html_safe)']) %}
2626
{% set category = 'danger' if category == 'error' or category == 'error(html_safe)' else category %}
27-
<div class="alert alert-{{ category[::11] if category.endswith('(html_safe)') else category }}">
27+
<div class="alert alert-{{ category[:-('(html_safe)'|length)] if category.endswith('(html_safe)') else category }}">
2828
<a class="close" data-dismiss="alert" href="#">&times;</a>
2929
{% if category.endswith('(html_safe)') %}
3030
{{ msg|safe }}

0 commit comments

Comments
 (0)