Skip to content

[SSR] client/server VDOM mismatch with CRLF multiline text (LF works) #4560

@remoe

Description

@remoe

Vue.js version

2.1.7

Steps to reproduce

module.exports = {
  data: function() {
    return {
      desc: require('desc.html')
    }
  },
  template: "<p>{{desc}}</p>",
}

desc.html has a multiline text with CRLF like:

asdlfh sadfkjh asdfhk asdflkjh:
asdlfhj asdflkh asdflkh

What is Expected?

code generation without a warning/error.

What is actually happening?

Error:

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render. 

It works when one use only LF in the desc.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions