summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-08-05 20:04:53 (GMT)
committerBrad King <brad.king@kitware.com>2003-08-05 20:04:53 (GMT)
commit8830b45b886a92614fef2fda7c86eeefe61b3d2f (patch)
tree9df6407c3ccbd5917c29008b00dca7c68a8957a6 /Source
parent2799e2c66bbed3aa41d3292ee8d2c2353bd6d3ab (diff)
downloadCMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.zip
CMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.tar.gz
CMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.tar.bz2
BUG#92 - Added XML escaping for <, >, and &.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 95f0977..42b7632 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1022,6 +1022,9 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s)
{
std::string ret = s;
cmSystemTools::ReplaceString(ret, "\"", "&quot;");
+ cmSystemTools::ReplaceString(ret, "&", "&amp;");
+ cmSystemTools::ReplaceString(ret, "<", "&lt;");
+ cmSystemTools::ReplaceString(ret, ">", "&gt;");
return ret;
}
@@ -1029,6 +1032,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(const char* pa
{
std::string ret = cmSystemTools::ConvertToOutputPath(path);
cmSystemTools::ReplaceString(ret, "\"", "&quot;");
+ cmSystemTools::ReplaceString(ret, "&", "&amp;");
+ cmSystemTools::ReplaceString(ret, "<", "&lt;");
+ cmSystemTools::ReplaceString(ret, ">", "&gt;");
return ret;
}
@@ -1036,6 +1042,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(const ch
{
std::string ret = cmSystemTools::ConvertToOutputPath(path);
cmSystemTools::ReplaceString(ret, "\"", "");
+ cmSystemTools::ReplaceString(ret, "&", "&amp;");
+ cmSystemTools::ReplaceString(ret, "<", "&lt;");
+ cmSystemTools::ReplaceString(ret, ">", "&gt;");
return ret;
}