{% with obj as event %}{% with event.object as entry %}
{% autoescape off %}
{% spaceless %}{% if entry.title %}
    {% if entry.is_local %}
        {% if settings.use_titles %}
            {{ entry.title }}
        {% else %}
            {{ entry|truncatewords:20 }}
        {% endif %}
    {% else %}
        {{ entry.title|striptags }}
    {% endif %}
{% else %}
    {{ entry|truncatewords:20 }}
{% endif %}{% endspaceless %}
{% endautoescape %}
{% endwith %}{% endwith %}