Skip to content

Commit

Permalink
global: fix flash message CSS class bug
Browse files Browse the repository at this point in the history
* Fix bug introduced by ecb6d6e.
  CSS class of 'html_safe' flash messages where not displayed
  properly.

Signed-off-by: Nicolas Harraudeau <[email protected]>
  • Loading branch information
Nicolas Harraudeau committed Sep 1, 2015
1 parent bf14781 commit a4635e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invenio/base/templates/_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'(html_safe)', 'info(html_safe)', 'danger(html_safe)', 'error(html_safe)',
'warning(html_safe)', 'success(html_safe)']) %}
{% set category = 'danger' if category == 'error' or category == 'error(html_safe)' else category %}
<div class="alert alert-{{ category[::11] if category.endswith('(html_safe)') else category }}">
<div class="alert alert-{{ category[:-('(html_safe)'|length)] if category.endswith('(html_safe)') else category }}">
<a class="close" data-dismiss="alert" href="#">&times;</a>
{% if category.endswith('(html_safe)') %}
{{ msg|safe }}
Expand Down

0 comments on commit a4635e2

Please sign in to comment.