Fixed spelling error.
This commit is contained in:
@@ -432,18 +432,19 @@ namespace Ganss.XSS
|
|||||||
/// <returns>The sanitized HTML body fragment.</returns>
|
/// <returns>The sanitized HTML body fragment.</returns>
|
||||||
public string Sanitize(string html, string baseUrl = "", IMarkupFormatter outputFormatter = null)
|
public string Sanitize(string html, string baseUrl = "", IMarkupFormatter outputFormatter = null)
|
||||||
{
|
{
|
||||||
var dom = SantizeDom(html, baseUrl);
|
var dom = SanitizeDom(html, baseUrl);
|
||||||
var output = dom.Body.ChildNodes.ToHtml(outputFormatter ?? OutputFormatter);
|
var output = dom.Body.ChildNodes.ToHtml(outputFormatter ?? OutputFormatter);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sanitizes the specified HTML body fragment. If a document is given, only the body part will be returned.
|
/// Sanitizes the specified HTML body fragment. If a document is given, only the body part will be returned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="html">The HTML body fragment to sanitize.</param>
|
/// <param name="html">The HTML body fragment to sanitize.</param>
|
||||||
/// <param name="baseUrl">The base URL relative URLs are resolved against. No resolution if empty.</param>
|
/// <param name="baseUrl">The base URL relative URLs are resolved against. No resolution if empty.</param>
|
||||||
/// <returns>The sanitized HTML Document.</returns>
|
/// <returns>The sanitized HTML Document.</returns>
|
||||||
public IHtmlDocument SantizeDom(string html, string baseUrl = "")
|
public IHtmlDocument SanitizeDom(string html, string baseUrl = "")
|
||||||
{
|
{
|
||||||
var parser = HtmlParserFactory();
|
var parser = HtmlParserFactory();
|
||||||
var dom = parser.Parse("<html><body></body></html>");
|
var dom = parser.Parse("<html><body></body></html>");
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace Ganss.XSS
|
|||||||
/// <param name="html">The HTML body fragment to sanitize.</param>
|
/// <param name="html">The HTML body fragment to sanitize.</param>
|
||||||
/// <param name="baseUrl">The base URL relative URLs are resolved against. No resolution if empty.</param>
|
/// <param name="baseUrl">The base URL relative URLs are resolved against. No resolution if empty.</param>
|
||||||
/// <returns>The sanitized HTML Document.</returns>
|
/// <returns>The sanitized HTML Document.</returns>
|
||||||
IHtmlDocument SantizeDom(string html, string baseUrl = "");
|
IHtmlDocument SanitizeDom(string html, string baseUrl = "");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sanitizes the specified HTML document. Even if only a fragment is given, a whole document will be returned.
|
/// Sanitizes the specified HTML document. Even if only a fragment is given, a whole document will be returned.
|
||||||
|
|||||||
Reference in New Issue
Block a user