Skip to content

Text interpolation handling of carriage return causes hydration mismatch #13988

@kirk-loretz-fsn

Description

@kirk-loretz-fsn

Version

3.5.22

Reproduction link

play.vuejs.org/

Steps to reproduce

Load the page so that Vue hydrates the SSR HTML.

What is expected?

Similar to HTML parsing, I expect Vue to normalize newlines by replacing every CRLF with a LF and then replace every remaining CR with a LF.

What is actually happening?

Vue renders the CRLF on the server as is. During hydration, Vue expects CRLF on the client. But the browser has replaced the CRLF with LF during parsing, causing a hydration mismatch.


Hydration mismatch also occurs when interpolating a CR that is not followed by LF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions