BUG#92 - Added XML escaping for <, >, and &.
This commit is contained in:
parent
2799e2c66b
commit
8830b45b88
|
@ -1022,6 +1022,9 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s)
|
||||||
{
|
{
|
||||||
std::string ret = s;
|
std::string ret = s;
|
||||||
cmSystemTools::ReplaceString(ret, "\"", """);
|
cmSystemTools::ReplaceString(ret, "\"", """);
|
||||||
|
cmSystemTools::ReplaceString(ret, "&", "&");
|
||||||
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
|
cmSystemTools::ReplaceString(ret, ">", ">");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1029,6 +1032,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(const char* pa
|
||||||
{
|
{
|
||||||
std::string ret = cmSystemTools::ConvertToOutputPath(path);
|
std::string ret = cmSystemTools::ConvertToOutputPath(path);
|
||||||
cmSystemTools::ReplaceString(ret, "\"", """);
|
cmSystemTools::ReplaceString(ret, "\"", """);
|
||||||
|
cmSystemTools::ReplaceString(ret, "&", "&");
|
||||||
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
|
cmSystemTools::ReplaceString(ret, ">", ">");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1036,6 +1042,9 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(const ch
|
||||||
{
|
{
|
||||||
std::string ret = cmSystemTools::ConvertToOutputPath(path);
|
std::string ret = cmSystemTools::ConvertToOutputPath(path);
|
||||||
cmSystemTools::ReplaceString(ret, "\"", "");
|
cmSystemTools::ReplaceString(ret, "\"", "");
|
||||||
|
cmSystemTools::ReplaceString(ret, "&", "&");
|
||||||
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
|
cmSystemTools::ReplaceString(ret, ">", ">");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue