Closed gigabit-eth closed 3 months ago
Hello @gigabit-eth.
Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.
Minimal reproductions are required as they save us a lot of time reproducing your config & environment, and trying to reproduce your issue. See Why reproductions are required.
Please reopen this issue when a reproduction is added.
Describe the bug
When a user clicks a button to receive a random question, if the question contains an apostrophe, the text is malformed on subsequent renders after navigating back and forth. This issue seems to stem from the currentState not properly handling apostrophes.
Screenshot 1: Initial Render![exhibit-1](https://github.com/wevm/frog/assets/85522894/caa727bc-e9f9-4481-920b-9a2a2da2b086)
Screenshot 2: Subsequent Render![exhibit-1b](https://github.com/wevm/frog/assets/85522894/95bae7fb-fa85-4076-8f7b-31bf840923ee)
Link to Minimal Reproducible Example
No response
Steps To Reproduce
Initial State:
Trigger the Issue:
Observe:
Expected Behavior
The question text should consistently appear correctly, with apostrophes properly rendered as intended (e.g., What's).
Actual Behavior
Upon the second render after navigating back and forth, the apostrophe in the question text is replaced with its HTML entity (e.g., What & # 3 9 ; s).
Potential Cause
It seems that the 'currentState' is not correctly handling apostrophes, leading to the text being malformed upon subsequent renders.
Frog Version
0.11.2
TypeScript Version
5
Check existing issues
Anything else?
No response