Permalink
Browse files

Adding html encoding when updating or removing Public Access of a con…

…tent.
  • Loading branch information...
elit0451 committed Nov 5, 2018
1 parent 9077eac commit aaa920719f5ae5ef16d75034ebb9870f696c2b46
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
@@ -1,6 +1,7 @@
using System;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -268,7 +269,7 @@ protected void protect_Click(object sender, CommandEventArgs e)
}
}

feedback_text.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text);
feedback_text.Text = HttpUtility.HtmlEncode(ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text));

p_setup.Visible = false;
p_feedback.Visible = true;
@@ -287,7 +288,7 @@ protected void buttonRemoveProtection_Click(object sender, System.EventArgs e)

Access.RemoveProtection(pageId);

feedback_text.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text);
feedback_text.Text = HttpUtility.HtmlEncode(ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text));
p_feedback.Visible = true;

var content = ApplicationContext.Current.Services.ContentService.GetById(pageId);

0 comments on commit aaa9207

Please sign in to comment.