U4-3027 - fix content & property types alias casing
This commit is contained in:
@@ -20,9 +20,11 @@ namespace Umbraco.Web.WebServices
|
||||
[HttpGet]
|
||||
public JsonResult ToSafeAlias(string value, bool camelCase = true)
|
||||
{
|
||||
// always return a proper camel-cased alias
|
||||
// when checking... javascript does a case-unsensitive comparison
|
||||
return value == null
|
||||
? Json(new {error = "no value."}, JsonRequestBehavior.AllowGet)
|
||||
: Json(new { alias = value.ToSafeAlias(camelCase) }, JsonRequestBehavior.AllowGet);
|
||||
: Json(new { alias = value.ToCleanString(CleanStringType.Alias | CleanStringType.CamelCase) }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
||||
Reference in New Issue
Block a user