{% load i18n future pages_tags %}
{% spaceless %}
{% if page_branch_in_menu %}

{% if branch_level == 0 %}
    {% for page in page_branch %}
    {% if page.in_menu %}
    <li class="dropdown{% if page.is_current_or_ascendant %} active{% endif %}"
        id="dropdown-menu-{{ page.html_id }}">
        <a href="{{ page.get_absolute_url }}">
            {% if page.link.html_class %}
                <span class="{{ page.link.html_class }}"></span>
            {% endif %}
            {{ page.title }}
            {% if page.has_children_in_menu %}<span class="caret"></span>{% endif %}
        </a>
        {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
    </li>
    {% endif %}
    {% endfor %}
{% endif %}

{% if branch_level == 1 %}
<ul class="dropdown-menu">
    {% for page in page_branch %}
    {% if page.in_menu %}
    <li{% if page.is_current_or_ascendant %} class="active"{% endif %}
        id="dropdown-menu-{{ page.html_id }}">
        <a href="{{ page.get_absolute_url }}">
            {% if page.link.html_class %}
                <span class="{{ page.link.html_class }}"></span>
            {% endif %}
            {{ page.title }}
        </a>
    </li>
    {% endif %}
    {% endfor %}
</ul>
{% endif %}

{% endif %}
{% endspaceless %}
{% load i18n future pages_tags %}
{% spaceless %}
{% if page_branch_in_menu %}

{% if branch_level == 0 %}
    {% for page in page_branch %}
    {% if page.in_menu %}
    <li class="dropdown{% if page.is_current_or_ascendant %} active{% endif %}"
        id="dropdown-menu-{{ page.html_id }}">
        <a href="{{ page.get_absolute_url }}">
            {% if page.link.html_class %}
                <span class="{{ page.link.html_class }}"></span>
            {% endif %}
            {{ page.title|safe }}
            {% if page.has_children_in_menu %}<span class="caret"></span>{% endif %}
        </a>
        {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
    </li>
    {% endif %}
    {% endfor %}
{% endif %}

{% if branch_level == 1 %}
<ul class="dropdown-menu">
    {% for page in page_branch %}
    {% if page.in_menu %}
    <li{% if page.is_current_or_ascendant %} class="active"{% endif %}
        id="dropdown-menu-{{ page.html_id }}">
        <a href="{{ page.get_absolute_url }}">
            {% if page.link.html_class %}
                <span class="{{ page.link.html_class }}"></span>
            {% endif %}
            {{ page.title|safe }}
        </a>
    </li>
    {% endif %}
    {% endfor %}
</ul>
{% endif %}

{% endif %}
{% endspaceless %}

Make the title safe to add html tags in it.
Make the title safe to add html tags in it.
