Html string and formatting utilities
Westwind.Utilities.HtmlUtils
public static class HtmlUtils : object
Class Members
Member | Description | |
---|---|---|
DisplayMemo |
Fixes a plain text field for display as HTML by replacing carriage returns with the appropriate br and p tags for breaks. public static string DisplayMemo(string htmlText) |
|
DisplayMemoEncoded |
Method that handles handles display of text by breaking text. Unlike the non-encoded version it encodes any embedded HTML text public static string DisplayMemoEncoded(string text) |
|
FixHTMLForDisplay |
Replaces and and Quote characters to HTML safe equivalents. public static string FixHTMLForDisplay(string html) |
|
Href |
Create an Href HTML link public static string Href(string text, string url, string target, string additionalMarkup) public static string Href(string url) |
|
HtmlAbstract |
Creates an Abstract from an HTML document. Strips the HTML into plain text, then creates an abstract. public static string HtmlAbstract(string html, int length) |
|
HtmlEncode |
HTML-encodes a string and returns the encoded string. public static string HtmlEncode(string text) |
|
ImgRef |
Returns an IMG link as a string. If the image is null or empty a blank string is returned. public static string ImgRef(string imageUrl, string additionalMarkup) |
|
StripHtml |
Strips HTML tags out of an HTML string and returns just the text. public static string StripHtml(string html) |
Requirements
Namespace: Westwind.UtilitiesAssembly: westwind.utilities.dll
© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic