summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorThomas Sorrel <thomas@pandeiro.fr>2014-03-02 21:46:51 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-03-03 22:57:06 +0100
commit53c576452e2e8feef857cd67a5c17f9159d95eb6 (patch)
tree85e1a9f0fb60994a4743399684e4b65bd806bd9b /django
parent7bbb6958dcb6a450f926e5bb49b07391f801aef1 (diff)
Fixed #16727 -- Added protocol-relative URL support to contenttypes.views.shortcut.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/contenttypes/views.py b/django/contrib/contenttypes/views.py
index 430ed800da..6bc3aa04dd 100644
--- a/django/contrib/contenttypes/views.py
+++ b/django/contrib/contenttypes/views.py
@@ -34,7 +34,7 @@ def shortcut(request, content_type_id, object_id):
# if necessary.
# If the object actually defines a domain, we're done.
- if absurl.startswith('http://') or absurl.startswith('https://'):
+ if absurl.startswith(('http://', 'https://', '//')):
return http.HttpResponseRedirect(absurl)
# Otherwise, we need to introspect the object's relationships for a