/// <summary>
/// Processes the property.
/// </summary>
/// <param name="value">The value.</param>
/// <param name="property">The property.</param>
private static void ProcessProperty(object value, PropertyDescriptor property)
{
if (property.Attributes.Contains(AntiXssHtmlText))
{
property.SetValue(value, Sanitizer.GetSafeHtmlFragment((string) property.GetValue(value)));
}
else if (property.Attributes.Contains(AntiXssIgnore))
{
// do nothing this contains special text
}
else
{
property.SetValue(value, HttpUtility.HtmlDecode(HttpUtility.HtmlEncode((string)property.GetValue(value))));
}
}