[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: Fwd: Anakia VSL getText() loses CR from multi-line text
From: sebb <sebbaz () gmail ! com>
Date: 2009-06-02 9:19:15
Message-ID: 25aac9fc0906020219t6bc7acc7i2cc94a9957f1d6fe () mail ! gmail ! com
[Download RAW message or body]
Anyone?
I ended up using Ant to fix the mangled EOLs, but this is not ideal,
as it can take a while.
---------- Forwarded message ----------
From: sebb <sebbaz@gmail.com>
Date: 9 May 2009 23:46
Subject: Anakia VSL getText() loses CR from multi-line text
To: Velocity Users List <user@velocity.apache.org>
I'm using Anakia/Velocity 1.6.2 to render XML as HTML on Win/XP.
The input XML all has CRLF line endings, but the generated HTML has
some lines that end with LF only. [This causes SVN checkin to fail]
The code that causes the problem is as follows:
#foreach ($rl_node in $itemToLoop.getContent())
$rl_node.getText()
#end
If the text has CRLF in the input, then it ends up with just LF in the output.
So
<tag>inline text</tag>
is handled OK, but
<tag>
text
more text
etc.
</tag>
generates output with LF line endings.
Is there a way to stop this happening?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic