On Sat, Feb 16, 2002 at 12:28:17PM -0500, Mark Mills wrote:
> >>>I had hoped that I could do a [% data | replace('\n', "\n") %]
> >>Try replace('\\n', "\n") maybe?
> >Nope - doesn't help.
> OK, I sat down and installed Template on my router at home to play and
> got [% data.replace('\\\\\\\\n', "\n") %] to do what you wanted. =)
Hmmm... This is very useful in the short term, thanks. However, I'm
slightly wary of putting that in production code, as it seems like
something that is likely to be 'fixed' in a later version?
> That is eight slashes... which leads me to believe that there are three
> interpolations in there which reduce `\\' to `\'!
> There is also some special magic I'm missing since [% '\\' %] throws an
> error but [% '\\n' %] prints `\n' rather than the `n' that I expected or
> the return I feared.
> Between the template parser itself, the GET routine, the SET routine,
> and perl, my mind is now swimming. But, I think I found your solution.
*grin*
Andy, is this expected behaviour?
Thanks,
Tony