Allowing digits in technical names

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-05-02 10:27:02 -07:00
parent 32bf7dfe41
commit 75ab94816d

View File

@@ -8,7 +8,7 @@ using Orchard.Localization;
namespace Orchard.Utility.Extensions {
public static class StringExtensions {
private static readonly Regex humps = new Regex("(?:^[a-zA-Z][^A-Z]*|[A-Z][^A-Z]*)");
private static readonly Regex safe = new Regex(@"[^_\-a-zA-Z]+");
private static readonly Regex safe = new Regex(@"[^_\-a-zA-Z\d]+");
public static string CamelFriendly(this string camel) {
if (String.IsNullOrWhiteSpace(camel))