Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly transform youtu.be links to be /watch routes in comments and descriptions #2365

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

syeopite
Copy link
Member

@syeopite syeopite commented Aug 31, 2021

Follow up to #2347 (comment)

if !url.host
elsif url.host == "youtu.be"
url = "/watch?v=#{url.request_target.lstrip('/')}"
elsif {"m.youtube.com", "www.youtube.com"}.includes? url
if url.path == "/redirect"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik youtu.be doesn't actually have a /redirect path. It should be fine to remove handling for youtu.be here.

@SamantazFox SamantazFox merged commit a1001ad into iv-org:master Sep 1, 2021
@syeopite syeopite deleted the fix-youtu.be-links branch September 1, 2021 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants