2021-02-18 11:06:02 +01:00
|
|
|
namespace Umbraco.Cms.Core.Strings
|
2019-11-27 08:27:18 +01:00
|
|
|
{
|
2019-12-04 10:39:49 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Represents an HTML-encoded string that should not be encoded again.
|
|
|
|
|
/// </summary>
|
2019-11-27 08:27:18 +01:00
|
|
|
public class HtmlEncodedString : IHtmlEncodedString
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
private string _htmlString;
|
|
|
|
|
|
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Web.HtmlString" /> class.</summary>
|
|
|
|
|
/// <param name="value">An HTML-encoded string that should not be encoded again.</param>
|
|
|
|
|
public HtmlEncodedString(string value)
|
|
|
|
|
{
|
|
|
|
|
this._htmlString = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Returns an HTML-encoded string.</summary>
|
|
|
|
|
/// <returns>An HTML-encoded string.</returns>
|
|
|
|
|
public string ToHtmlString()
|
|
|
|
|
{
|
|
|
|
|
return this._htmlString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Returns a string that represents the current object.</summary>
|
|
|
|
|
/// <returns>A string that represents the current object.</returns>
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return this._htmlString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|