diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-02-12 20:49:08 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-02-12 20:49:08 (GMT) |
commit | cb94587a88866f3278676ea011c78e1c9d3663ec (patch) | |
tree | bf393cf16305eee6683d84ec927a99e234b427ca /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | 84dafee565cd49fd26b2018f82059ad5eed99cb1 (diff) | |
download | CMake-cb94587a88866f3278676ea011c78e1c9d3663ec.zip CMake-cb94587a88866f3278676ea011c78e1c9d3663ec.tar.gz CMake-cb94587a88866f3278676ea011c78e1c9d3663ec.tar.bz2 |
Fix XML escaping for the project() name in Eclipse projects (#11658)
Alex
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 0ef771f..4cd052a 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -875,8 +875,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const fout << "</cconfiguration>\n" "</storageModule>\n" "<storageModule moduleId=\"cdtBuildSystem\" version=\"4.0.0\">\n" - "<project id=\"" << mf->GetProjectName() << ".null.1\"" - " name=\"" << mf->GetProjectName() << "\"/>\n" + "<project id=\"" << this->EscapeForXML(mf->GetProjectName()) + << ".null.1\" name=\"" << this->EscapeForXML(mf->GetProjectName()) + << "\"/>\n" "</storageModule>\n" "</cproject>\n" ; @@ -927,7 +928,8 @@ cmExtraEclipseCDT4Generator::GenerateProjectName(const std::string& name, const std::string& type, const std::string& path) { - return name + (type.empty() ? "" : "-") + type + "@" + path; + return cmExtraEclipseCDT4Generator::EscapeForXML(name) + +(type.empty() ? "" : "-") + type + "@" + path; } std::string cmExtraEclipseCDT4Generator::EscapeForXML(const std::string& value) |