3

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.

allenylzhou
  • 1,431
  • 4
  • 19
  • 36

1 Answers1

4

You can escape it with \n or \u000A, see:

How do I break a string across more than one line of code in JavaScript?

Community
  • 1
  • 1
ckg
  • 204
  • 3
  • 10