taw / magic-search-engine

Search engine for Magic cards
MIT License
45 stars 20 forks source link

Search breaks with non-ascii quotation marks #224

Closed axxroytovu closed 1 year ago

axxroytovu commented 1 year ago

This is mostly an issue with searching on mobile, which automatically uses U+201C, and U+201D quotes instead of the standard ascii U+0022.

https://mtg.wtf/card?q=subset%3A%22monster+movie+marathon%22 - works https://mtg.wtf/card?q=subset%3A%E2%80%9Cmonster+movie+marathon%E2%80%9D - broken

taw commented 1 year ago

Fixed now. Are there any other weird characters which we should un-substitute?

axxroytovu commented 1 year ago

I don't know how single quotes/apostraphes/graves are treated but that might be cleaned up. Maybe em-dash/en-dash/hyphen? I can't think of any situation where those would cause the system to actually crash but they are commonly confused for each other.

taw commented 1 year ago

I'll close this issue. If you find another character causing troubles, just let me know.

axxroytovu commented 1 year ago

Will do, glad it was an easy fix.