Ticket #6100: 6100.2.diff

File 6100.2.diff, 979 bytes (added by Gary Wilson, 17 years ago)
  • django/contrib/admin/options.py

     
    383383                post_url_continue += "?_popup=1"
    384384            return HttpResponseRedirect(post_url_continue % pk_value)
    385385        if request.POST.has_key("_popup"):
    386             if type(pk_value) is str: # Quote if string, so JavaScript doesn't think it's a variable.
    387                 pk_value = '"%s"' % pk_value.replace('"', '\\"')
    388             return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
     386            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \
    389387                # escape() calls force_unicode.
    390388                (escape(pk_value), escape(new_object)))
    391389        elif request.POST.has_key("_addanother"):
Back to Top