diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-01-29 19:44:52 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-01-29 19:44:52 +0100 |
commit | 8de97dac03fc97a9705c8d3cd3163330a6f08375 (patch) | |
tree | df36aff925e8c110813359590ce03b4af41e947f /searx/utils.py | |
parent | bac98a02cbca8083c1dfcaf54c55be2bcfb0576b (diff) | |
download | searxng-8de97dac03fc97a9705c8d3cd3163330a6f08375.tar.gz searxng-8de97dac03fc97a9705c8d3cd3163330a6f08375.zip |
[mod] pretty url separation
Diffstat (limited to 'searx/utils.py')
-rw-r--r-- | searx/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/searx/utils.py b/searx/utils.py index e3f095355..cd2392b9d 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -218,3 +218,10 @@ def dict_subset(d, properties): if k in d: result[k] = d[k] return result + + +def prettify_url(url): + if len(url) > 74: + return u'{0}[...]{1}'.format(url[:35], url[-35:]) + else: + return url |