Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

oEmbed URL with international characters leads to 400 #477

Open
garmoncheg opened this issue Oct 15, 2020 · 0 comments
Open

oEmbed URL with international characters leads to 400 #477

garmoncheg opened this issue Oct 15, 2020 · 0 comments

Comments

@garmoncheg
Copy link

garmoncheg commented Oct 15, 2020

Problem: Meta oEmbed url is generated with wrong data in an international page. E.g.: https://www.documentcloud.org/documents/7203159-Joaquín-El-Chapo-Guzmán-Appeal.html

So example oEmbed url leading to 400 is generated like so:
https://www.documentcloud.org/api/oembed.json?url=https%3A%2F%2Fwww.documentcloud.org%2Fdocuments%2F7203159-Joaqu%C3%ADn-El-Chapo-Guzm%C3%A1n-Appeal.html

I believe the solution should be similar to URL encoding this variable or there is something in underlying data logic maybe.
<%= @oembeddable_resource.oembed_url %>

@garmoncheg garmoncheg changed the title Oembed URL with international characters leads to 400 oEmbed URL with international characters leads to 400 Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant