Skip to content

Input Text Removes \n from the string #811

Description

Hi,

We are using dust.js

What we are doing?

  • We want to show string as it is coming from JSON into input box let say "This is the \n test box \n testing"

Problem

When we write <input type="text" value="This is the \n test box \n testing" /> then

  • Text box come with same string including "\n"

When we use dynamic value from object {name: "This is the \n test box \n testing"}
and use like <input type="text" value="{name}" /> then

  • it shows like "This is the test box testing" which does not have "\n" and that is the problem where our actual data changes and reflect as problem at many places.

Please help asap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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