Input Text Removes \n from the string
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using dust.js with the JSON object and the dynamic input value shown in the report. Compare the literal input value with the rendered {name} value, then verify that the newline characters are preserved in the rendered result without changing the underlying string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100