mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[mod] pretty url separation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user