Fixes: U4-2627 Ensure that the plugins cache files are named with the machine name
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