mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
Fix OEmbed discovery not handling different URL variants in query (#12439)
Fix #12433
This commit is contained in:
@@ -58,7 +58,7 @@ class FetchOEmbedService
|
|||||||
url_domain = Addressable::URI.parse(@url).normalized_host
|
url_domain = Addressable::URI.parse(@url).normalized_host
|
||||||
|
|
||||||
endpoint_hash = {
|
endpoint_hash = {
|
||||||
endpoint: @endpoint_url.gsub(URI.encode_www_form_component(@url), '{url}'),
|
endpoint: @endpoint_url.gsub(/(=(http[s]?(%3A|:)(\/\/|%2F%2F)))([^&]*)/i, '={url}'),
|
||||||
format: @format,
|
format: @format,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user