Ticket #9211: admin_escape_popup_newlines.diff
File admin_escape_popup_newlines.diff, 811 bytes (added by , 16 years ago) |
---|
-
django/contrib/admin/options.py
426 426 if request.POST.has_key("_popup"): 427 427 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 428 428 # escape() calls force_unicode. 429 (escape(pk_value), escape(obj) ))429 (escape(pk_value), escape(obj).replace(u'\r\n', ur'\r\n'))) 430 430 elif request.POST.has_key("_addanother"): 431 431 self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name))) 432 432 return HttpResponseRedirect(request.path)