Bug 6759 - xbuild doesn't handle special character escapes correctly
Summary: xbuild doesn't handle special character escapes correctly
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-30 06:22 UTC by Antonius Riha
Modified: 2015-06-23 17:44 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test case for bug (2.58 KB, application/zip)
2012-08-30 06:22 UTC, Antonius Riha
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 6759 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Antonius Riha 2012-08-30 06:22:29 UTC
Created attachment 2434 [details]
Test case for bug

When escaping a special character in the project file, e.g. ";" with "%3B",
xbuild seems to resolve the escape sequence and interpret it as if the
actual character was given.

So, for example, if I'd like to include a file named "MySourc;eFile1.cs", I'd
normally write:
<ItemGroup>
  <Compile Include="MySourc%3BeFile1.cs" />
</ItemGroup>

and expect xbuild to compile the file "MySourc;eFile1.cs". Instead, xbuild
resolves "%3B" to ";" and looks for 2 files: "MySourc" and "eFile1.cs" and
subsequently fails. 

An attached test case illustrates the problem.
Comment 1 Martin Costello 2015-06-23 17:44:16 UTC
This was working in Mono 4.0.1 but as the currently nightly build of Mono 4.3.0 (as of 23/06/15) is no longer working as described in this bug.

In my case %22 is no longer being converted to a double quote, which is being used to escape the possibility of spaces in paths.

Correct interpretation with Mono 4.0.1: https://travis-ci.org/experiandataquality/electronicupdates/builds/68014174#L2094

Incorrect interpretation with Mono 4.3.0: https://travis-ci.org/experiandataquality/electronicupdates/builds/68027929#L1004