phmonte / Buildalyzer

A utility to perform design-time builds of .NET projects without having to think too hard about it.
MIT License
589 stars 92 forks source link

Escape semicolon in property values #273

Closed slang25 closed 1 month ago

slang25 commented 1 month ago

Fixes #271

slang25 commented 1 month ago

It might be worth making the escape behaviour a bit more complete, opinions welcome: https://github.com/dotnet/msbuild/blob/ad4df597b038182ff632602c1e2f59f3ed131d76/src/Shared/EscapingUtilities.cs#L284-L310

phmonte commented 1 month ago

@slang25 do you see a way to create a unit test for this scenario?

I believe this problem will not only happen with the ";"

slang25 commented 1 month ago

I'll follow up with some tests and a fuller PR soon 🙂

softlion commented 1 month ago

@slang25 do you see a way to create a unit test for this scenario?

I believe this problem will not only happen with the ";"

This happens because of how linux sh/bash interpreter works.

You only need to escape ";" "," and space.