diff options
author | Luca Cappa <lucappa@microsoft.com> | 2019-03-05 19:08:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-06 14:37:21 (GMT) |
commit | 0bf4418017d7d6f653a8e3192a8f628a35587a04 (patch) | |
tree | c9f306f04b5c2b664ed19d57434be0596607ad3a /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 20a41aa589d4418f9ac46fc8c0402162d1d82873 (diff) | |
download | CMake-0bf4418017d7d6f653a8e3192a8f628a35587a04.zip CMake-0bf4418017d7d6f653a8e3192a8f628a35587a04.tar.gz CMake-0bf4418017d7d6f653a8e3192a8f628a35587a04.tar.bz2 |
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
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8e08417..7736e59 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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; } |