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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ouuan opened this issue Aug 13, 2023 · 2 comments
Open

Comments

@ouuan
Copy link

ouuan commented Aug 13, 2023

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:

  • The first request is always sent. The second request is only sometimes sent. The second request is more likely to be sent if the network cache is disabled (or using a forced refresh), or the user is not logged in. It's also more likely in Chrome than in Firefox on my machine.
  • It does not happen if the script is used instead of the component. (Given that it does not always happen, I'm not sure.)
  • Whenever the second request is sent, there is also a request for https://giscus.app/_next/data/juf5uGDEc0gFUN83cwLIn/en/widget.json

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

@ouuan
Copy link
Author

ouuan commented Aug 14, 2023

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

鍥剧墖

@ouuan
Copy link
Author

ouuan commented Jan 7, 2024

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

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

1 participant