HolodexNet / Holodex

Holodex frontend source code
https://holodex.net
MIT License
532 stars 92 forks source link

Quote watch page topic search query due to commas #769

Closed meepzh closed 3 months ago

meepzh commented 3 months ago

On a video watch page, the topic tag also serves as a link to search for other streams with the same topic. If that topic ID has a comma, then it will cause issues with the search query parameters.

Ideally, we would reuse json2csv to handle the encoding, but json2csv before version 5 does not support synchronous evaluation. Upgrading to v5 requires upgrades to the node version and some other packages. Promises as a return value aren't supported either: [Vue warn]: Invalid prop: type check failed for prop "to". Expected String, Object, got Promise.

So the simple solution is to just quote the topic IDs. This works for topics with and without commas.