Carriage return fail

Wednesday, November 4, 2015

I have a basic html file, a php script which gets the content of this html file and stores it in a variable and a javascript script that tries to get the variable created by the php file to display it in a embedded HTML editor present on a intranet page.



The final goal is to send an email based on already existing html template.



The php var got the right content
Whe the js script get this var is try to inject it in the html editor, the following error occur :



SyntaxError: unterminated string literal


I found a solution : writing my html file with \ character as carriage return.



Bit it annoy me a lot. Do you have any other idea ?



I may be doing it wrong, it is maybe not the best way to proceed ...



I just want to display html template in a embedded HTML editor
(and edit certain fields in the template based on a mysql query)

0 comments:

Post a Comment