Skip to content

Commit

Permalink
Check if the given string is url
Browse files Browse the repository at this point in the history
  • Loading branch information
Zharktas authored and tino097 committed Sep 26, 2017
1 parent 2e3108c commit daad60e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/lib/helpers.py
Expand Up @@ -173,7 +173,8 @@ def redirect_to(*args, **kw):
_url = ''
skip_url_parsing = False
if uargs and len(uargs) is 1 and isinstance(uargs[0], basestring) \
and uargs[0].startswith('/') and len(matching) is 0:
and (uargs[0].startswith('/') or is_url(uargs[0])) \
and len(matching) is 0:
skip_url_parsing = True
_url = uargs[0]

Expand Down

0 comments on commit daad60e

Please sign in to comment.