Encoding a line break in a string without using HTML
-
11-12-2019 - |
Question
Is there a way to encode a line break into a string without using any HTML entities or tags? Specifically, I would like a string that I pass into the dojox.gfx renderer to display a line break.
Solution
You can escape it with \n
or \u000A
, see:
How do I break a string across more than one line of code in JavaScript?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow