Skip to content

Non-breaking space characters passed via props are double-escaped in component template output #6981

Closed
@s-robertson

Description

@s-robertson

Version

2.5.2

Reproduction link

https://jsfiddle.net/srobertson203/98Lp2ch0/

Steps to reproduce

  1. Create a new component that accepts a string prop.
  2. Use the handlebar syntax to display the prop within the component's template.
  3. Use the component in a Vue application and pass a string containing a non-breaking space character for the prop.

What is expected?

The non-breaking space character should be escaped as an HTML entity in the raw HTML, but appear as a normal space in the rendered HTML.

What is actually happening?

The non-breaking space character is double-escaped as an HTML entity and instead appears as   in the rendered HTML.


As shown in the jsfiddle, all other characters that should be escaped as HTML entities (such as & and < or >)are behaving as expected. It's only the non-breaking space character that's double-escaped.

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