ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54285] New: Ant task exec arg value does not quote properly for MSWindows
Date Wed, 12 Dec 2012 19:24:56 GMT

            Bug ID: 54285
           Summary: Ant task exec arg value does not quote properly for
           Product: Ant
           Version: 1.8.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
    Classification: Unclassified

Created attachment 29747
Java code proposal to escape properly double quotes for MSWindows

I want to pass to some application the following string:\\
<link rel="icon" type="image/png" size="48x48" href="path/to/my/favion.png" />

So I use the following:\\
<exec executable="some_executable.exe">
<arg value="&lt;link rel=&quote;icon&quote; type=&quote;image/png&quote;
size=&quote;48x48&quote; href=&quote;path/to/my/favion.png&quote; /&gt;"/>

However, the application gets this instead:\\
<link rel=icon type=image/png size=48x48 href=path/to/my/favion.png />

Double quotes were stripped by MSWindows because they were not properly escaped
in the command line by Ant.

I wrote a piece of code to do escaping of double quotes properly, and I
attached it to the issue. There are two implementation proposed for the double
quote escaping, on is based on regexps, and the other is plain character
processing --- probably more efficient, but maybe a little more obscure.

You are receiving this mail because:
You are the assignee for the bug.

View raw message