【发布时间】:2017-06-19 18:06:45
【问题描述】:
我在树枝中输出 html 时遇到问题。我正在使用 Bolt CMS 3.2
{% for item in menu %}
<li class="list-inline {{ item.path == '/#' ? 'dropdown' }}">
<a href="{{ item.path }}" >
{% autoescape %}
{% set caret = '<span class="caret"></span>' %}
{{ (item.path == '/#') ? caret|raw : item.label }}
{% endautoescape %}
</a>
</li>
{% endfor %}
但它一直将 html 输出为字符串。我使用了自动转义值,但它在这里什么都不做。我用错了吗?
【问题讨论】: