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

YouTube and Wikipedia links that fail #13

Closed
mcognetta opened this issue Aug 20, 2022 · 2 comments
Closed

YouTube and Wikipedia links that fail #13

mcognetta opened this issue Aug 20, 2022 · 2 comments

Comments

@mcognetta
Copy link

mcognetta commented Aug 20, 2022

I encountered several YouTube and Wikipedia links that fail to load on Nutshell (both on my site and in your example sandbox). I would guess this affects other types of links, but I include these two since they are explicitly given as examples on your site. As a note: all of the examples in your example sandbox worked fine on my site.

I simply don't know enough to know if this is an issue with Nutshell or a problem with the specific pages that I tried to load or something else. Hope this can shed some light on it.

P.S. (so that it doesn't get lost at the bottom) This project is awesome, it is just what I've been looking for for a while.


YouTube:

[:julia](https://www.youtube.com/watch?v=N4h46_TCmGc&t=10s)

nutshell_julia_youtube

Clicking on the video produces an error and then redirects to YouTube's main page. Embedding without the timestamp works as expected.


Wikipedia:

[:Miller](https://en.wikipedia.org/wiki/Miller–Rabin_primality_test)

nutshell_wikipedia

This also happens with

[:Miller](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test)

Other notes:

I thought that it may be due to the character encoding during HTML generation ( changed to %E2%80%93 and & changed to &), but I tried writing it directly with HTML and it still didn't work.

@ncase
Copy link
Owner

ncase commented Aug 27, 2022

Thank you for catching both of these bugs, with detailed testable examples @mcognetta ! I fixed both of them with the new Nutshell release (version 1.0.2)

If you're curious, the Wikipedia bug was caused by me forgetting to run the article title through decodeURIcomponent() first. Whoops. And the YouTube bug was caused by me only covering the case where the ?t= timestamp was on youtu.be links, not youtube.com. Double whoops.

Big thanks again! 🎉

@ncase ncase closed this as completed Aug 27, 2022
@mcognetta
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants