Fixing 25454: Exporting translation could end up in infinite loop

[TFS Changeset #65013]
This commit is contained in:
starfighter83
2010-03-26 12:46:17 +00:00
parent 884ee1f847
commit bbeef89b57

View File

@@ -112,10 +112,8 @@ namespace umbraco.cms.businesslogic.translation
tmpStr = tmpStr.Replace("\n", " ");
tmpStr = tmpStr.Replace("\r", " ");
while (tmpStr.IndexOf(" ") != -1)
tmpStr = tmpStr.Replace(" ", " ");
return tmpStr.Split(' ').Length;
MatchCollection collection = Regex.Matches(tmpStr, @"[\S]+");
return collection.Count;
}
}
}