mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
no slash on host root for search
This commit is contained in:
parent
f3a2116b6e
commit
514836fd4f
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ get '/browse/search' do
|
|||
@resp['items'].each do |item|
|
||||
link = Addressable::URI.parse(item['link'])
|
||||
unencoded_path = Rack::Utils.unescape(Rack::Utils.unescape(link.path)) # Yes, it needs to be decoded twice
|
||||
item['unencoded_link'] = link.host+unencoded_path
|
||||
item['unencoded_link'] = unencoded_path == '/' ? link.host : link.host+unencoded_path
|
||||
item['link'] = link
|
||||
|
||||
next if link.host == 'neocities.org'
|
||||
|
|
Loading…
Add table
Reference in a new issue