Properly URL Encodes stylesheet properties
This commit is contained in:
@@ -58,12 +58,12 @@ namespace umbraco
|
||||
{
|
||||
var sheetId = sheet.Path.TrimEnd(".css");
|
||||
var xNode = XmlTreeNode.Create(this);
|
||||
xNode.NodeID = sheetId + "_" + prop.Name;
|
||||
xNode.NodeID = sheetId + "_" + HttpUtility.UrlEncode(prop.Name);
|
||||
xNode.Text = prop.Name;
|
||||
xNode.Action = "javascript:openStylesheetProperty('" +
|
||||
//Needs to be escaped for JS
|
||||
HttpUtility.UrlEncode(sheet.Path) +
|
||||
"','" + prop.Name + "');";
|
||||
"','" + HttpUtility.UrlEncode(prop.Name) + "');";
|
||||
xNode.Icon = "icon-brackets";
|
||||
xNode.OpenIcon = "icon-brackets";
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace umbraco
|
||||
s.AddProperty(new StylesheetProperty(Alias, "." + Alias.ToSafeAlias(), ""));
|
||||
Umbraco.Core.ApplicationContext.Current.Services.FileService.SaveStylesheet(s);
|
||||
|
||||
_returnUrl = string.Format("settings/stylesheet/property/EditStyleSheetProperty.aspx?id={0}&prop={1}", HttpUtility.UrlEncode(s.Path), Alias);
|
||||
_returnUrl = string.Format("settings/stylesheet/property/EditStyleSheetProperty.aspx?id={0}&prop={1}", HttpUtility.UrlEncode(s.Path), HttpUtility.UrlEncode(Alias));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user