Content extensions.
Methods
BuildModerateHtmlSanitizer
BuildModerateHtmlSanitizer ()
Build a HtmlSanitizer which removes unsafe markup and allows a subset of supported markup, suitable for multi-line content which was generated by an end user.
BuildStandardHtmlSanitizer
BuildStandardHtmlSanitizer ()
Build a HtmlSanitizer which removes unsafe markup but allows as much as possible.
BuildStrictHtmlSanitizer
BuildStrictHtmlSanitizer ()
Build a HtmlSanitizer which removes unsafe markup and allows a subset of supported markup, suitable for simple multi-line content.
BuildSvgSanitizer
BuildSvgSanitizer ()
Build a HtmlSanitizer which removes unsafe markup from SVG content.
BuildVeryStrictHtmlSanitizer
BuildVeryStrictHtmlSanitizer ()
Build an HtmlSanitizer which supports a very limited set of elements, suitable for single lines content like module titles, headings and similar.
ConvertTo
(Content, String) Method
ConvertTo (Content content, String targetContentType)
SanitizeHtml
(Content) Method
SanitizeHtml (Content content)
Sanitize the Html in content.Value.
SanitizeHtml
(String) Method
SanitizeHtml (String content)
Sanitize the specified Html string.
SanitizeHtml
(String, HtmlSanitizeStrictness) Method
SanitizeHtml (String content, HtmlSanitizeStrictness strictness)
Sanitize the specified Html string.
SanitizeSvg
(Stream) Method
SanitizeSvg (Stream content)
Sanitize the specified Html string.
ToHtml
(Content) Method
ToHtml (Content content)
Convert the specified content to Html.
ToHtml
(String, String) Method
ToHtml (String content, String fromContentType)
Return a string containing the conversion of the specified
Models.Content object's
Value to Html.
Parameters
| Name |
Type |
|
content
|
String
|
|
fromContentType
|
String
MIME type of the original content.
|
Returns
The converted content string.
ToMarkdown
(Content) Method
ToMarkdown (Content content)
Return a string containing the conversion of the specified
Models.Content object's
Value to Markdown.
ToMarkdown
(String, String) Method
ToMarkdown (String content, String fromContentType)
Converts the specified string content to Markdown.
Parameters
| Name |
Type |
|
content
|
String
|
|
fromContentType
|
String
MIME type of the original content.
|
Returns
The converted content string.
ToText
(Content) Method
ToText (Content content)
Return a string containing the conversion of the specified
Models.Content object's
Value to plain text.
ToText
(String, String) Method
ToText (String content, String fromContentType)
Convert the specified string content to plain text.
Parameters
| Name |
Type |
|
content
|
String
|
|
fromContentType
|
String
MIME type of the original content.
|
Returns
The converted content string.