Example:
Text area field "text_area_fld" contains:
This is line one
This is line two
When I use the token in a Javascript function, the carriage return is breaking the code:
var astring = "{!text_area_fld}";
Resolves to:
var astring = "This is line one
This is line two";
...which produces a syntax error because there's a carriage return..
I need it to resolve to something like this:
var astring = "This is line one This is line two";
Any suggestions on how I could handle a case like this?
This should be handled by template parser, I'll see what I can do.
This is actually work fine on server side. So I assume you're talking about client-side code.
You can try to use AJAX API to retrieve TextArea's value rather than use template token.
The AJAX API worked: rbf_getFields().
Thanks.