Merge remote-tracking branch 'origin/6.1.4' into 7.0.0

Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/BusinessLogic/BaseTest.cs
This commit is contained in:
Shannon
2013-08-21 11:36:37 +10:00
23 changed files with 150 additions and 76 deletions

View File

@@ -28,6 +28,17 @@ namespace Umbraco.Core
[UmbracoWillObsolete("Do not use this constants. See IShortStringHelper.CleanStringForSafeAliasJavaScriptCode.")]
public const string UmbracoInvalidFirstCharacters = "01234567890";
internal static string ReplaceNonAlphanumericChars(this string input, char replacement)
{
//any character that is not alphanumeric, convert to a hyphen
var mName = input;
foreach (var c in mName.ToCharArray().Where(c => !char.IsLetterOrDigit(c)))
{
mName = mName.Replace(c, replacement);
}
return mName;
}
public static string ExceptChars(this string str, HashSet<char> toExclude)
{
var sb = new StringBuilder(str.Length);