Commit 9594c888 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

BUG: On Windows, remove extra CR characters. Hopefully this will result in not duplicated new-lines

parent d4f17854
......@@ -155,7 +155,11 @@ std::string cmCTest::MakeXMLSafe(const std::string& str)
for (std::string::size_type pos = 0; pos < str.size(); pos ++ )
{
unsigned char ch = str[pos];
if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 )
if ( ch == '\r' )
{
// Ignore extra CR characters.
}
else if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 )
{
char buffer[33];
sprintf(buffer, "&lt;%d&gt;", (int)ch);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment