diff --git a/WHATSNEW b/WHATSNEW index 69d357c2b..350921f5a 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -4,6 +4,11 @@ Changes from Ant 1.4.1 to current CVS version Changes that could break older environments: -------------------------------------------- +* was fixed to expand properties inside nested and + elements; before this only happened when you assigned the text + to the string attribute. If you had $ signs in the string, they may + need escaping. + * the RegexpMatcher interface has been extended to support case insensitive matches and other options - custom implementations of this interface won't work any longer. We recommend to use the new diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java index 0786d7e96..89c097886 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java @@ -246,7 +246,15 @@ public class TelnetTask extends Task { { throw new BuildException("Shouldn't be able instantiate a SubTask directly"); } - public void addText(String s) { setString(s);} + /** + * nested text elements need their properties explicitly expanded + */ + public void addText(String s) { + setString(project.replaceProperties(s)); + } + /** + * attribute assignment of properties + */ public void setString(String s) { taskString += s;