aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/formatting.py
diff options
context:
space:
mode:
authorTom Christie2013-06-26 14:41:07 -0700
committerTom Christie2013-06-26 14:41:07 -0700
commit35e4d1cf9cdc71d1ac6501feb0337d27a1cf946e (patch)
tree740fd49cbc21b8c84381f77b2340b84588d928bf /rest_framework/utils/formatting.py
parent69e5e3cc0db481e4fad7ac34bf28b73f4786e790 (diff)
parentc8b0e6c40f6bcf447aa539ff98b9985aa53032ce (diff)
downloaddjango-rest-framework-35e4d1cf9cdc71d1ac6501feb0337d27a1cf946e.tar.bz2
Merge pull request #943 from trwired/utf8safedocs
Make browsable API views play nice with utf-8
Diffstat (limited to 'rest_framework/utils/formatting.py')
-rw-r--r--rest_framework/utils/formatting.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/utils/formatting.py b/rest_framework/utils/formatting.py
index ebadb3a6..4bec8387 100644
--- a/rest_framework/utils/formatting.py
+++ b/rest_framework/utils/formatting.py
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
from django.utils.html import escape
from django.utils.safestring import mark_safe
-from rest_framework.compat import apply_markdown
+from rest_framework.compat import apply_markdown, smart_text
import re
@@ -63,7 +63,7 @@ def get_view_description(cls, html=False):
Return a description for an `APIView` class or `@api_view` function.
"""
description = cls.__doc__ or ''
- description = _remove_leading_indent(description)
+ description = _remove_leading_indent(smart_text(description))
if html:
return markup_description(description)
return description