mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#18255: Fixing field name sanitizing
Work Item: 18255 --HG-- branch : 1.x
This commit is contained in:
@@ -241,10 +241,8 @@ namespace Orchard.ContentTypes.Services {
|
||||
name = name.Trim();
|
||||
|
||||
// don't allow non A-Z chars as first letter, as they are not allowed in prefixes
|
||||
if(name.Length > 0) {
|
||||
if (!IsLetter(name[0])) {
|
||||
name = name.Substring(1);
|
||||
}
|
||||
while(name.Length > 0 && !IsLetter(name[0])) {
|
||||
name = name.Substring(1);
|
||||
}
|
||||
|
||||
if (name.Length > 128)
|
||||
|
||||
Reference in New Issue
Block a user