diff options
| author | Piotr Jakimiak <pj306228@students.mimuw.edu.pl> | 2015-05-08 09:32:21 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-05-08 08:46:20 -0400 |
| commit | 4f8cbf08beee01bd214a56309db81ef258b8e2fc (patch) | |
| tree | c277fd6d379e76921c2c3539dded0e9df310a273 | |
| parent | 34b6b89bd26743e1c8750e8c4d3ffd93e3580e47 (diff) | |
Replaced multiple startswith in syndication/views.py
| -rw-r--r-- | django/contrib/syndication/views.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/syndication/views.py b/django/contrib/syndication/views.py index e8511ddfc9..3d310ba1f4 100644 --- a/django/contrib/syndication/views.py +++ b/django/contrib/syndication/views.py @@ -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 |
