mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
Merge pull request #3556 from rense/master
format_html was missing in optional_logout template-tag
This commit is contained in:
commit
a67d23139c
|
@ -61,7 +61,8 @@ def optional_logout(request, user):
|
|||
try:
|
||||
logout_url = reverse('rest_framework:logout')
|
||||
except NoReverseMatch:
|
||||
return '<li class="navbar-text">{user}</li>'.format(user=user)
|
||||
snippet = format_html('<li class="navbar-text">{user}</li>', user=escape(user))
|
||||
return mark_safe(snippet)
|
||||
|
||||
snippet = """<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
|
|
Loading…
Reference in New Issue
Block a user