Skip to content

Commit

Permalink
Implement the fix to ensure that any add url params are correctly enc…
Browse files Browse the repository at this point in the history
…oded
  • Loading branch information
Aiky30 committed Jul 22, 2020
1 parent 78b26e4 commit 860a850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cms/admin/placeholderadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from django.utils.six.moves.urllib.parse import parse_qsl, urlparse
from django.utils.decorators import method_decorator
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from django.utils.translation import get_language_from_path, ugettext as _

from django.views.decorators.clickjacking import xframe_options_sameorigin
Expand Down Expand Up @@ -343,7 +344,7 @@ def add_plugin(self, request):
# errors is s dict mapping fields to a list of errors
# for that field.
error = list(form.errors.values())[0][0]
return HttpResponseBadRequest(force_text(error))
return HttpResponseBadRequest(conditional_escape(force_text(error)))

plugin_data = form.cleaned_data
placeholder = plugin_data['placeholder_id']
Expand Down

0 comments on commit 860a850

Please sign in to comment.