Kaydet (Commit) 8dafd04c authored tarafından Claude Paroz's avatar Claude Paroz

Fixed #17257 - Removed outdated comment in syndication view

Thanks krzysiumed for the patch.
üst 8855f938
...@@ -10,6 +10,7 @@ from django.utils.encoding import force_unicode, iri_to_uri, smart_unicode ...@@ -10,6 +10,7 @@ from django.utils.encoding import force_unicode, iri_to_uri, smart_unicode
from django.utils.html import escape from django.utils.html import escape
from django.utils.timezone import is_naive from django.utils.timezone import is_naive
def add_domain(domain, url, secure=False): def add_domain(domain, url, secure=False):
protocol = 'https' if secure else 'http' protocol = 'https' if secure else 'http'
if url.startswith('//'): if url.startswith('//'):
...@@ -18,8 +19,6 @@ def add_domain(domain, url, secure=False): ...@@ -18,8 +19,6 @@ def add_domain(domain, url, secure=False):
elif not (url.startswith('http://') elif not (url.startswith('http://')
or url.startswith('https://') or url.startswith('https://')
or url.startswith('mailto:')): or url.startswith('mailto:')):
# 'url' must already be ASCII and URL-quoted, so no need for encoding
# conversions here.
url = iri_to_uri('%s://%s%s' % (protocol, domain, url)) url = iri_to_uri('%s://%s%s' % (protocol, domain, url))
return url return url
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment