i have html string stored in database. when go set value of javascript variable string on front-end via templating engine (leaf), stores escaped as:
var string = <p>it's round way.</p> <p><!-- pagebreak -->but maybe way?</p>;
i'm trying set value content value tinymce, javascript produces unexpected eof error when reading string , points & character, presume first character of new line. tried on back-end replace occurrences of string \r\n
play nicer javascript changes didn't seem take. tried encoding/decoding string didn't help. perhaps can shed light on seemingly trivial task?
thanks in advance.
javascript rendering \r\n characters found in string instead of escaping them. parsed out in server-side code instead of handling in js.
Comments
Post a Comment