mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 08:19:17 +02:00
[mod] pretty url separation
This commit is contained in:
parent
bac98a02cb
commit
8de97dac03
2 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue