trips content/media names, makes sure that the content type editor when rendering template names html encodes the names.
This commit is contained in:
@@ -162,7 +162,7 @@ namespace Umbraco.Web.WebApi.Binders
|
||||
//finally, let's lookup the real content item and create the DTO item
|
||||
model.PersistedContent = GetExisting(model);
|
||||
}
|
||||
|
||||
|
||||
//create the dto from the persisted model
|
||||
if (model.PersistedContent != null)
|
||||
{
|
||||
@@ -173,7 +173,9 @@ namespace Umbraco.Web.WebApi.Binders
|
||||
//now map all of the saved values to the dto
|
||||
MapPropertyValuesFromSaved(model, model.ContentDto);
|
||||
}
|
||||
|
||||
|
||||
model.Name = model.Name.Trim();
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace umbraco.settings
|
||||
templateList.Items.Clear();
|
||||
templateList.Items.AddRange(templates.ConvertAll(item =>
|
||||
{
|
||||
var li = new ListItem { Text = item.Name.CleanForXss(), Value = item.Id.ToString(CultureInfo.InvariantCulture), Selected = item.Selected };
|
||||
var li = new ListItem { Text = Server.HtmlEncode(item.Name), Value = item.Id.ToString(CultureInfo.InvariantCulture), Selected = item.Selected };
|
||||
return li;
|
||||
}).ToArray());
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace umbraco.settings
|
||||
ddlTemplates.Items.Insert(0, new ListItem(ui.Text("choose") + "...", "0"));
|
||||
ddlTemplates.Items.AddRange(templates.ConvertAll(item =>
|
||||
{
|
||||
var li = new ListItem { Text = item.Name.CleanForXss(), Value = item.Id.ToString(CultureInfo.InvariantCulture) };
|
||||
var li = new ListItem { Text = Server.HtmlEncode(item.Name), Value = item.Id.ToString(CultureInfo.InvariantCulture) };
|
||||
return li;
|
||||
}).ToArray());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user