Fixed #2152 -- Now HTML-escaping user.first_name in admin/base.html template

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-06-14 14:56:19 +00:00
parent 7bd31115f8
commit 8938d5eeb3
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@
{% block branding %}{% endblock %} {% block branding %}{% endblock %}
</div> </div>
{% if not user.is_anonymous %}{% if user.is_staff %} {% if not user.is_anonymous %}{% if user.is_staff %}
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div> <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
{% endif %}{% endif %} {% endif %}{% endif %}
{% block nav-global %}{% endblock %} {% block nav-global %}{% endblock %}
</div> </div>