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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration mismatch with non-printable characters #12535

Closed
cernymatej opened this issue Dec 12, 2024 · 1 comment
Closed

Hydration mismatch with non-printable characters #12535

cernymatej opened this issue Dec 12, 2024 · 1 comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope:hydration

Comments

@cernymatej
Copy link

cernymatej commented Dec 12, 2024

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#__SSR__eNp9kUFLxDAQhf9KnMteli5SvSxVUFlQDyoqeAlIacfaNU1CMqmF0v/uJGW1B9nc8t6byTeTEa6szfqAsIXCV661JDxSsJdSV0Z7EoQDiQuxukWljHgzTtUnUrqV1MVmLuAoXwg7q0pCvglRxHrBZxznBtOU5E3Ui80iC2sgzy99tE2290YzxxijEirT2Vahe7TUMomErUhO9Epm+b5PGrmA64NefWL19Y++90PUJDw59Oh6lPDrUekapNnevTww7cLsTB0Up4+Yz+iNCpFxjl0HXTP2Ipdo7zprHLW6efW7gVD7w1ARNCanlJfAn3FzZPQ/3Dw7S3VST7zF9x5d7MkLzLPz7DSH6Qet+5ud

Steps to reproduce

  1. Open the reproduction
  2. Look into the console

What is expected?

No hydration mismatch should occur since Vue should recognize that by retrieving the content of an HTML element from the DOM, it will not receive these characters.

What is actually happening?

When Vue renders a string with non-printable characters on the server, a hydration mismatch appears on the client.
For example:

const text = 'Hello World!\r'

Edit: Actually, it seems that only \r is causing problems based on my testing.

System Info

No response

Any additional comments?

No response

@jh-leong jh-leong added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope:hydration labels Dec 12, 2024
@jh-leong
Copy link
Member

Closing as a duplicate of #9229

@jh-leong jh-leong closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope:hydration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants