wevm / frog

Framework for Farcaster Frames 🐸
https://frog.fm
Other
408 stars 94 forks source link

FrogUI: Malformed apostrophes in State #323

Closed gigabit-eth closed 3 months ago

gigabit-eth commented 3 months ago

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

Screenshot 2: Subsequent Render exhibit-1b

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

github-actions[bot] commented 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.