Closed Edke closed 11 years ago
2 options:
add _safe variant of breadcrumb tag:
{% block breadcrumbs %}
{% breadcrumb_safe '<i class="icon-home"></i>' 'myapp.views.home' %}
{% endblock %}
or we could have label part inside of a block, so you could control escaping explicitly using django utils, bonus is that block allows you to use whatever logic you need there:
{% block breadcrumbs %}
{% breadcrumb_for 'myapp.views.home' %}
{% autoescape on/off %}
'<i class="icon-home"></i>'
{% endautoescape %}
{% endbreadcrumb_for %}
{% endblock %}
I can add both, so that you will only need to sed s/"{% breadcrumb"/"{% breadcrumb_safe"/g in your code and only move to breadcrumb_for where you need it.
pushed 0.3.2 with breadcrumb_safe, I'll add 0.4.0 with breadcrumb_for later
@prymitive breadcrumbs_safe will do just fine, breadcrumbs_for is just a bonus. Thank you for both and also for lightning fast response and pushing new version with fix. I can see again my lovely house icon in my breadcrumbs since upgrade :) Thanks.
happy to help, I've just released 0.4.0 with breadcrumb_for block tag, you can used for more complex stuff
My issue interfere with pull request in #6, but anyway, there are cases when I need to show for example icon and not a plain text as a label:
I would be pleased if this would also be possible.