django-crispy-forms / django-crispy-forms/django-crispy-forms
Arbitrary HTML in Bootstrap Tab
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 731
- PR merge metrics
- No merged PRs in 30d
Description
* Package version: 1.8.1
* Django version: 3.0.2
* Python version: 3.7.3
* Template pack: bootstrap3
### Description:
Currently it's not possible to include, e.g., FontAwesome icons in a bootstrap3 tab. I was able to get it working by replacing `{{ link.name|capfirst }}` with `{{ link.name|safe }}` in `templates/bootstrap3/layout/tab-link.html` and then
```
self.helper.layout = Layout(
TabHolder(
Tab(
' Align Left',
Row(),
css_id='align-left',
),
),
)
```
I don't know if `|safe` becomes a security issue or if people don't think this functionality is needed, but I like to put icons in my tabs so I figured I'd suggest it to the community. Currently, with the `|capfirst` tag the tab will show the HTML as text instead of rendering the icon. Thoughts?
Contributor guide
Assessment
This issue has not been assessed yet.