Class HtmlHelper
Class which provides HTML-related utility-functions.
Inherited Members
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public static class HtmlHelper
Methods
EscapePercentageSymbols(string)
Adds escape percentage text into the first tag of html. Required for C++ parser.
Declaration
public static string EscapePercentageSymbols(string html)
Parameters
| Type | Name | Description |
|---|---|---|
| string | html | Html string containing percentage symbols. |
Returns
| Type | Description |
|---|---|
| string | Html string with text that escapes percentage symbols in C++ parser. |
ExtractBodyFromHtml(string, bool)
Class which provides HTML-related utility-functions.
Declaration
public static string ExtractBodyFromHtml(string html, bool wrap)
Parameters
| Type | Name | Description |
|---|---|---|
| string | html | |
| bool | wrap |
Returns
| Type | Description |
|---|---|
| string |
GetHTMLBodyFromPlainText(string, bool)
Class which provides HTML-related utility-functions.
Declaration
public static string GetHTMLBodyFromPlainText(string text, bool fragment = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| bool | fragment |
Returns
| Type | Description |
|---|---|
| string |
GetPlainHTMLBody(string)
Retrieve plain text version of a html source
Declaration
public static string GetPlainHTMLBody(string source)
Parameters
| Type | Name | Description |
|---|---|---|
| string | source | HTML to convert to plain text |
Returns
| Type | Description |
|---|---|
| string | Plain text version of the provided html |
IsHtml(string)
Test if the text looks like it could be HTML. If this function returns false it means the text contains no tags.
Declaration
public static bool IsHtml(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| string | s | Input text |
Returns
| Type | Description |
|---|---|
| bool | True if the value provided contains at least 1 tag symbol |