Fixes merge issues and tests

This commit is contained in:
Shannon
2016-02-03 13:43:51 +01:00
parent e423864781
commit 797eb34f36
5 changed files with 32 additions and 37 deletions

View File

@@ -41,6 +41,16 @@ namespace Umbraco.Core
ToCSharpEscapeChars[escape[0]] = escape[1];
}
/// <summary>
/// Removes new lines and tabs
/// </summary>
/// <param name="txt"></param>
/// <returns></returns>
internal static string StripBlockWhitespace(this string txt)
{
return Regex.Replace(txt, @"^\s+|\s+$|\s+(?=\s)|\n|\r\n", string.Empty);
}
internal static string StripFileExtension(this string fileName)
{
//filenames cannot contain line breaks