Skip to content

Commit 9a0e746

Browse files
committed
Merge branch 'release/6.2.2'
2 parents 3affc19 + 676be95 commit 9a0e746

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
History
44
-------
55

6+
6.2.2 (2015-08-20)
7+
++++++++++++++++++
8+
9+
* Bug fix for escaped icons in buttons (reported by @jlec)
10+
11+
612
6.2.1 (2015-08-19)
713
++++++++++++++++++
814

bootstrap3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = '6.2.1'
3+
__version__ = '6.2.2'

bootstrap3/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def render_button(
120120
return render_tag(
121121
tag,
122122
attrs=attrs,
123-
content=text_concat(icon_content, content, separator=' '),
123+
content=mark_safe(text_concat(icon_content, content, separator=' ')),
124124
)
125125

126126

bootstrap3/tests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,3 +530,12 @@ def test_for_formset(self):
530530
formset=test_formset
531531
)
532532
self.assertIn('sr-only', res)
533+
534+
def test_button_with_icon(self):
535+
res = render_template(
536+
"{% bootstrap_button 'test' icon='info-sign' %}"
537+
)
538+
self.assertEqual(
539+
res.strip(),
540+
'<button class="btn"><span class="glyphicon glyphicon-info-sign"></span> test</button>'
541+
)

demo/demo/templates/demo/misc.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

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

13+
{% bootstrap_button 'button' size='lg' icon='info-sign' %}
14+
1315
{% bootstrap_alert "Something went wrong" alert_type='danger' %}
1416

1517
{% endblock %}

0 commit comments

Comments
 (0)