Set the HTML content of an instance's
<body> element with
|String||Specify the HTML to which the editor’s contents will be set as a string.|
No return value.
As you can see the double quotes in the content leads to a malformed string. CR/LF characters will create similar issues as the string would stretch over multiple lines. To avoid these issues you should remove CR and LF characters and escape any other characters that could cause issues for a string. These include:
- Single quote
- Double quote
How you escape these characters is specific to the server side language you are using but all popular server side languages provide the ability to escape characters in strings.