Commit 0bf44180 authored by Luca Cappa's avatar Luca Cappa Committed by Brad King

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
parent 20a41aa5
Pipeline #131578 passed with stage
......@@ -35,6 +35,7 @@ static std::string cmVS10EscapeAttr(std::string arg)
cmSystemTools::ReplaceString(arg, "<", "&lt;");
cmSystemTools::ReplaceString(arg, ">", "&gt;");
cmSystemTools::ReplaceString(arg, "\"", "&quot;");
cmSystemTools::ReplaceString(arg, "\n", "&#10;");
return arg;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment