Add XML escaping for directory name in Eclipse projects (#11658)

Alex
This commit is contained in:
Alex Neundorf 2011-02-12 22:01:27 +01:00
parent 8074bca93c
commit 79e13af195
1 changed files with 4 additions and 2 deletions

View File

@ -431,7 +431,8 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
{
emittedDirs.insert(dir);
fout << "<pathentry include=\""
<< cmExtraEclipseCDT4Generator::GetEclipsePath(dir)
<< cmExtraEclipseCDT4Generator::EscapeForXML(
cmExtraEclipseCDT4Generator::GetEclipsePath(dir))
<< "\" kind=\"inc\" path=\"\" system=\"true\"/>\n";
}
}
@ -1002,9 +1003,10 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
const char* prefix)
{
std::string targetXml = cmExtraEclipseCDT4Generator::EscapeForXML(target);
std::string pathXml = cmExtraEclipseCDT4Generator::EscapeForXML(path);
fout <<
"<target name=\"" << prefix << targetXml << "\""
" path=\"" << path.c_str() << "\""
" path=\"" << pathXml.c_str() << "\""
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
"<buildCommand>"
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)