Show / Hide Table of Contents

Class HtmlUtils

Inheritance
object
HtmlUtils
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke.dll
Syntax
public class HtmlUtils

Constructors

HtmlUtils()

Declaration
public HtmlUtils()

Methods

AbsoluteToRelativeUrls(string, IEnumerable<string>)

Declaration
public static string AbsoluteToRelativeUrls(string html, IEnumerable<string> aliases)
Parameters
Type Name Description
string html
IEnumerable<string> aliases
Returns
Type Description
string

Clean(string, bool)

Declaration
public static string Clean(string html, bool removePunctuation)
Parameters
Type Name Description
string html
bool removePunctuation
Returns
Type Description
string

CleanWithTagInfo(string, string, bool)

Declaration
public static string CleanWithTagInfo(string html, string tagsFilter, bool removePunctuation)
Parameters
Type Name Description
string html
string tagsFilter
bool removePunctuation
Returns
Type Description
string

ContainsEntity(string)

Declaration
public static bool ContainsEntity(string html)
Parameters
Type Name Description
string html
Returns
Type Description
bool

ConvertToHtml(string)

Declaration
public static string ConvertToHtml(string strText)
Parameters
Type Name Description
string strText
Returns
Type Description
string

ConvertToText(string)

Declaration
public static string ConvertToText(string strHtml)
Parameters
Type Name Description
string strHtml
Returns
Type Description
string

FormatEmail(string)

Declaration
public static string FormatEmail(string email)
Parameters
Type Name Description
string email
Returns
Type Description
string

FormatEmail(string, bool)

Declaration
public static string FormatEmail(string email, bool cloak)
Parameters
Type Name Description
string email
bool cloak
Returns
Type Description
string

FormatText(string, bool)

Declaration
public static string FormatText(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

FormatWebsite(object)

Declaration
public static string FormatWebsite(object website)
Parameters
Type Name Description
object website
Returns
Type Description
string

IsHtml(string)

Declaration
public static bool IsHtml(string text)
Parameters
Type Name Description
string text
Returns
Type Description
bool

IsUrlEncoded(string)

Declaration
public static bool IsUrlEncoded(string text)
Parameters
Type Name Description
string text
Returns
Type Description
bool

RemoveInlineStyle(string)

Declaration
public static string RemoveInlineStyle(string html)
Parameters
Type Name Description
string html
Returns
Type Description
string

Shorten(string, int, string)

Declaration
public static string Shorten(string txt, int length, string suffix)
Parameters
Type Name Description
string txt
int length
string suffix
Returns
Type Description
string

StripEntities(string, bool)

Declaration
[Obsolete("Deprecated in DotNetNuke 7.0.0. Please use System.Web.HtmlUtility.HtmlDecode. Scheduled for removal in v11.0.0.")]
public static string StripEntities(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

StripNonWord(string, bool)

Declaration
public static string StripNonWord(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

StripPunctuation(string, bool)

Declaration
public static string StripPunctuation(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

StripTags(string, bool)

Declaration
public static string StripTags(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

StripUnspecifiedTags(string, string, bool)

Declaration
public static string StripUnspecifiedTags(string html, string specifiedTags, bool retainSpace)
Parameters
Type Name Description
string html
string specifiedTags
bool retainSpace
Returns
Type Description
string

StripWhiteSpace(string, bool)

Declaration
public static string StripWhiteSpace(string html, bool retainSpace)
Parameters
Type Name Description
string html
bool retainSpace
Returns
Type Description
string

WriteError(HttpResponse, string, string)

Declaration
public static void WriteError(HttpResponse response, string file, string message)
Parameters
Type Name Description
HttpResponse response
string file
string message

WriteFeedback(HttpResponse, int, string)

Declaration
public static void WriteFeedback(HttpResponse response, int indent, string message)
Parameters
Type Name Description
HttpResponse response
int indent
string message

WriteFeedback(HttpResponse, int, string, bool)

Declaration
public static void WriteFeedback(HttpResponse response, int indent, string message, bool showtime)
Parameters
Type Name Description
HttpResponse response
int indent
string message
bool showtime

WriteFooter(HttpResponse)

Declaration
public static void WriteFooter(HttpResponse response)
Parameters
Type Name Description
HttpResponse response

WriteHeader(HttpResponse, string)

Declaration
public static void WriteHeader(HttpResponse response, string mode)
Parameters
Type Name Description
HttpResponse response
string mode

WriteKeepAlive()

Declaration
public static void WriteKeepAlive()

WriteScriptSuccessError(HttpResponse, bool, string)

Declaration
public static void WriteScriptSuccessError(HttpResponse response, bool bSuccess, string strLogFile)
Parameters
Type Name Description
HttpResponse response
bool bSuccess
string strLogFile

WriteSuccessError(HttpResponse, bool)

Declaration
public static void WriteSuccessError(HttpResponse response, bool bSuccess)
Parameters
Type Name Description
HttpResponse response
bool bSuccess

Extension Methods

JsonExtensionsWeb.ToJson(object)
Back to top by the community, for the community... #DNNCMS