giscus / giscus-component

Component library for giscus, a comment system powered by GitHub Discussions.
https://giscus-component.vercel.app
MIT License
298 stars 25 forks source link

Two discussion queries with different terms when the term contains a colon #1789

Open ouuan opened 10 months ago

ouuan commented 10 months ago

Reproduction repo: https://github.com/ouuan/giscus-colon-bug-reproduction

The term is FOO: bar 🤔.

It sometimes sends two discussion queries with different terms:

https://giscus.app/api/discussions?repo=ouuan%2Fgiscus-colon-bug-reproduction&term=foo%3A+bar+%25F0%259F%25A4%2594&category=giscus&number=0&strict=false&first=15
https://giscus.app/api/discussions?repo=ouuan%2Fgiscus-colon-bug-reproduction&term=FOO%3A+bar+%F0%9F%A4%94&category=giscus&number=0&strict=false&first=15

The first request changes letters before the colon to lowercase and double-URI-encodes the part after the colon.

I also observed the following:

It may result in different discussions seen by different users, which actually happens in my blog: https://github.com/ouuan/iles-blog/discussions/15 & https://github.com/ouuan/iles-blog/discussions/136

ouuan commented 10 months ago

It also results in incorrect discussion titles. I almost forgot this, and didn't investigate it at that time:

图片

ouuan commented 6 months ago

I've confirmed that this is still reproducible. Any look into this or at least an acknowledgment?