From d349ede3451fc4903ad2dac6de9977ae0ecfb38f Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Tue, 8 Oct 2013 15:40:47 +0200 Subject: [PATCH 1/2] Description should be html safe as the only values that it can contain are retrieved from docstrings. --- rest_framework/templates/rest_framework/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 2776d5500..e50d86b83 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -110,7 +110,7 @@
- {{ description }} + {{ description|safe }}
{{ request.method }} {{ request.get_full_path }}
From f97885f00f35eb7af2dc0dbc5e823723b28cba3a Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Tue, 8 Oct 2013 16:15:15 +0200 Subject: [PATCH 2/2] Allow to customize description so that markup can be accepted if needed. --- rest_framework/templates/rest_framework/base.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index e50d86b83..970dade55 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -110,7 +110,9 @@
+ {% block description %} {{ description|safe }} + {% endblock %}
{{ request.method }} {{ request.get_full_path }}