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

Links with nonnumeric collector numbers are broken until javascript/API fixes them #69

Open
NilsEnevoldsen opened this issue Oct 5, 2024 · 0 comments
Labels

Comments

@NilsEnevoldsen
Copy link
Owner

Input

<c set="ALL" number="88B">Elvish Ranger</c>

Link produced by Hooks.php before API is accessed (before mouseover)

Actual:
https://scryfall.com/search?q=%21%22Elvish+Ranger%22+set%3AALL+cn%3A88B&amp;utm_source=mw_MTGWiki
(i.e. https://scryfall.com/search?q=!"Elvish+Ranger"+set:ALL+cn:88B&utm_source=mw_MTGWiki)

Expected:
https://scryfall.com/search?q=%21%22Elvish+Ranger%22+set%3AALL+cn%3A%2288B%22&amp;utm_source=mw_MTGWiki
(i.e. https://scryfall.com/search?q=!"Elvish+Ranger"+set:ALL+cn:"88B"&utm_source=mw_MTGWiki)

Link produced after API is accessed (after mouseover)

Actual/Expected:
https://scryfall.com/card/all/88b/elvish-ranger?utm_source=mw_MTGWiki

Solution

Update this to have quotation marks:

$cnquery = $cn ? ' cn:' . $cn : '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant