diff options
author | Brad King <brad.king@kitware.com> | 2003-08-05 20:04:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-08-05 20:04:53 (GMT) |
commit | 8830b45b886a92614fef2fda7c86eeefe61b3d2f (patch) | |
tree | 9df6407c3ccbd5917c29008b00dca7c68a8957a6 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 2799e2c66bbed3aa41d3292ee8d2c2353bd6d3ab (diff) | |
download | CMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.zip CMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.tar.gz CMake-8830b45b886a92614fef2fda7c86eeefe61b3d2f.tar.bz2 |
BUG#92 - Added XML escaping for <, >, and &.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 9 |
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, "\"", """); + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); return ret; } @@ -1029,6 +1032,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(const char* pa { std::string ret = cmSystemTools::ConvertToOutputPath(path); cmSystemTools::ReplaceString(ret, "\"", """); + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); return ret; } @@ -1036,6 +1042,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(const ch { std::string ret = cmSystemTools::ConvertToOutputPath(path); cmSystemTools::ReplaceString(ret, "\"", ""); + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); return ret; } |