JavaSheriff
JavaSheriff

Reputation: 7665

apache velocity to ignore \n in token?

Is there a way to tell apache velocity to ignore \n in tokens?
For the following password token (line number 2)
The output is on line number 6 and 7

update someone marked this as Duplicate, its not, in my case the new line are in the token

enter image description here

Upvotes: 1

Views: 255

Answers (1)

Francois Du Toit
Francois Du Toit

Reputation: 121

I've just checked the following example:

#set($value="123\n123")
<label>$value<\label>

The printout is: "123\n123"

As long as you print out your variable in quotes it should print it as is and not convert the "\n" to a new line.

Upvotes: 1

Related Questions