Feb
11
How to Escape {“‘<>&} Characters in ANT
Written by Davy Hua
How exactly do you escape special characters from ANT? Say if you need to add extra ” quotation characters within a property which already has a set of quotes?
Here’s how to do it — use XML Character entity references:
For > use >
For < use <
For “ use "
For & use &
For ‘ use '
Any other characters you need? Drop me a line..
3 Responses to “How to Escape {“‘<>&} Characters in ANT”
Leave a Reply
Related Topics:
No related posts.

Thanx for great article.
How can we escape . (dot) in ant?
Hello,
Could you tell me how could I escape the ” and & characters in the properties files? I need to pass a string containing & to the command line and it constantly fails to work. If I echo the output and copy+paste in the command line manually it works but from the script it fails.
Any help would be appreciated, I even tried replacing ” and & with unicode correspondent code and still no result