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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user