mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 14:10:27 -06:00
VS: Encode newlines in XML attributes
Encode `\n` as ` ` to avoid generating a literal newline inside an XML attribute. This is more readable and also fixes custom commands in `.csproj` files with VS 2019 RC. Fixes: #19001
This commit is contained in:
@@ -35,6 +35,7 @@ static std::string cmVS10EscapeAttr(std::string arg)
|
||||
cmSystemTools::ReplaceString(arg, "<", "<");
|
||||
cmSystemTools::ReplaceString(arg, ">", ">");
|
||||
cmSystemTools::ReplaceString(arg, "\"", """);
|
||||
cmSystemTools::ReplaceString(arg, "\n", " ");
|
||||
return arg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user