Skip to content

Commit

Permalink
Merge branch 'release/6.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Aug 20, 2015
2 parents 3affc19 + 676be95 commit 9a0e746
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
History
-------

6.2.2 (2015-08-20)
++++++++++++++++++

* Bug fix for escaped icons in buttons (reported by @jlec)


6.2.1 (2015-08-19)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion bootstrap3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '6.2.1'
__version__ = '6.2.2'
2 changes: 1 addition & 1 deletion bootstrap3/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def render_button(
return render_tag(
tag,
attrs=attrs,
content=text_concat(icon_content, content, separator=' '),
content=mark_safe(text_concat(icon_content, content, separator=' ')),
)


Expand Down
9 changes: 9 additions & 0 deletions bootstrap3/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,12 @@ def test_for_formset(self):
formset=test_formset
)
self.assertIn('sr-only', res)

def test_button_with_icon(self):
res = render_template(
"{% bootstrap_button 'test' icon='info-sign' %}"
)
self.assertEqual(
res.strip(),
'<button class="btn"><span class="glyphicon glyphicon-info-sign"></span> test</button>'
)
2 changes: 2 additions & 0 deletions demo/demo/templates/demo/misc.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

{% bootstrap_button 'button' size='lg' %}

{% bootstrap_button 'button' size='lg' icon='info-sign' %}

{% bootstrap_alert "Something went wrong" alert_type='danger' %}

{% endblock %}

0 comments on commit 9a0e746

Please sign in to comment.