The development environment is node.js and express.
Using ejs template.
Stored in database
"Hello.<br>Testing."
How do I load a string so that the tag works when I print it out to my browser?
Browser If loaded with tags
Hello.
Testing.
I'd like to print it out on my browser.
"Hello.<br>Testing.""
It is printed as it is.
What I want to do is to find out how to save a string in the database to make the opening valid and loaded when loaded into the browser.
html rendering string newline
It seems to have escaped automatically when I called.
You have to use the tag that you just call.
I think you used ejs last time, if it is correct
If you look at the Tags part on ,
<%- data %>
It's a tag that prints as it is without a mask.
© 2024 OneMinuteCode. All rights reserved.