Hi all.
I'm in front of a pretty annoying problem.
Here is what I do :
1) fetching a multiple lines text from postgresql.
2) storing this text in a tcl variable in the .tcl
3) using this variable in a javascript function in the adp.
After 2), I use :
"set text [string map {\n \\n} $text]"
so that all end of lines are actually replaced by "\n" and javascript does not interpret the end of line as it is.
But that doesn't work. Inside the JS, using :
mailto:template_[@content.id@]="@text@";
will make a "Unterminated string literal" error.
The weird thing is that if I put @text@ somewhere in the adp, the browser will display the text like I want :
"some sweet text \nlike \nI want it".
And event worth, if I use inside JS :
mailto:template_[@content.id@]="some sweet text \nlike \nI want it";
It works ! :/
I'm lost, I don't know what's wrong and how to fix the problem.
Thanks for any advice