mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
feat: add presence checking and html escaping for link
This commit is contained in:
parent
42ac3c8a21
commit
be1ed83930
@ -48,9 +48,15 @@ module Invidious::Routes::Misc
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
link = env.params.query["link"]?
|
||||
link = HTML.escape(link.to_s)
|
||||
|
||||
referer = get_referer(env)
|
||||
|
||||
templated "confirm_leave"
|
||||
if link && !link.empty?
|
||||
templated "confirm_leave"
|
||||
else
|
||||
env.redirect "#{referer}"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user