Perhaps someone has run into this.. some entry into the database is creating a 
situation in which the returned string has some sort of line breaks. I tried \n 
and \r etc.. and no matter what, my Javacript is breaking because I can't seem 
to identify what is causing these line breaks and thus when I push it into a js 
var, it breaks.
ala

someJSvar = "this is the returned txt from some template var


Test has some odd line breaks..";




--- On Tue, 8/7/12, Summer <crazysummer2...@yahoo.com> wrote:

From: Summer <crazysummer2...@yahoo.com>
Subject: [Templates] How would i convert this regex using TT replace?
To: templates@template-toolkit.org
Date: Tuesday, August 7, 2012, 1:44 PM

Hello,

I have this in javascript, but having issue converting it to be able to use 
with template toolkit replace method.

js way:
replace(/(\r\n|\n|\r)/gm,"<br />");

template toolkit way?


-----Inline Attachment Follows-----

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to