Commit 4f8cbf08 authored by Piotr Jakimiak's avatar Piotr Jakimiak Committed by Tim Graham
Browse files

Replaced multiple startswith in syndication/views.py

parent 34b6b89b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -19,9 +19,7 @@ def add_domain(domain, url, secure=False):
    if url.startswith('//'):
        # Support network-path reference (see #16753) - RSS requires a protocol
        url = '%s:%s' % (protocol, url)
    elif not (url.startswith('http://')
            or url.startswith('https://')
            or url.startswith('mailto:')):
    elif not url.startswith(('http://', 'https://', 'mailto:')):
        url = iri_to_uri('%s://%s%s' % (protocol, domain, url))
    return url