Mustache js line break

You should use <br> but in your mustache template you must use {{{myString}}} to escape html


The best approach, in my opinion, is to apply the following CSS to the element you want to show with line breaks:

white-space: pre;

That way, all the \n will actually show as line breaks. There are also other ways of handling this, for example see Mustache.js allow only line breaks, escape other HTML.


white-space: pre-wrap, NOT white-space: pre (won't transfer a long string otherwise)