mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix escaping for search params
This commit is contained in:
parent
c58841100a
commit
25c8cd9246
1 changed files with 6 additions and 1 deletions
|
@ -361,9 +361,14 @@ def produce_search_params(sort : String = "relevance", date : String = "", conte
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if object["2:embedded"].as(Hash).empty?
|
||||||
|
object.delete("2:embedded")
|
||||||
|
end
|
||||||
|
|
||||||
params = object.try { |i| Protodec::Any.cast_json(object) }
|
params = object.try { |i| Protodec::Any.cast_json(object) }
|
||||||
.try { |i| Protodec::Any.from_json(i) }
|
.try { |i| Protodec::Any.from_json(i) }
|
||||||
.try { |i| Base64.urlsafe_encode(i, padding: false) }
|
.try { |i| Base64.urlsafe_encode(i) }
|
||||||
|
.try { |i| URI.encode_www_form(i) }
|
||||||
|
|
||||||
return params
|
return params
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue