summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-11-17 20:57:51 (GMT)
committerBrad King <brad.king@kitware.com>2005-11-17 20:57:51 (GMT)
commit8dc8232027ba0cb639c5c8fe7b19a873da6e8f61 (patch)
tree93825fd15b0726761ca9cffd180c3b3583277269
parent0df3c162fba0233030674f76162fb0131dbddcc5 (diff)
downloadCMake-8dc8232027ba0cb639c5c8fe7b19a873da6e8f61.zip
CMake-8dc8232027ba0cb639c5c8fe7b19a873da6e8f61.tar.gz
CMake-8dc8232027ba0cb639c5c8fe7b19a873da6e8f61.tar.bz2
BUG: Fixed XML escapes for custom commands. Also added escaping of newlines for VS 2005.
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 493eb81..fb307d7 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1162,8 +1162,6 @@ WriteCustomRule(std::ostream& fout,
const char *output,
const char* compileFlags)
{
- std::string cmd = command;
- cmSystemTools::ReplaceString(cmd, "\"", "&quot;");
std::vector<std::string>::iterator i;
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>(m_GlobalGenerator)->GetConfigurations();
@@ -1183,7 +1181,8 @@ WriteCustomRule(std::ostream& fout,
<< "\t\t\t\t\tDescription=\"Building " << comment;
fout << " " << output;
fout << "\"\n"
- << "\t\t\t\t\tCommandLine=\"" << cmd << "\n\"\n"
+ << "\t\t\t\t\tCommandLine=\""
+ << this->EscapeForXML(command) << "\"\n"
<< "\t\t\t\t\tAdditionalDependencies=\"";
// Write out the dependencies for the rule.
std::string temp;
@@ -1381,6 +1380,7 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s)
cmSystemTools::ReplaceString(ret, "\"", "&quot;");
cmSystemTools::ReplaceString(ret, "<", "&lt;");
cmSystemTools::ReplaceString(ret, ">", "&gt;");
+ cmSystemTools::ReplaceString(ret, "\n", "&#x0D;&#x0A;");
return ret;
}