HtmlUtils

TheArtOfDev.HtmlRenderer.Core.Utils

Konstruktoren

HtmlUtils()

Init.

Methoden

DecodeHtml(string) : string

Decode html encoded string to regular string. Handles <, >, "&.

str
the string to decode

Rückgabe: decoded string

DecodeHtmlCharByCode(string) : string

Decode html special charecters encoded using char entity code (€)

str
the string to decode

Rückgabe: decoded string

DecodeHtmlCharByName(string) : string

Decode html special charecters encoded using char entity name (&#euro;)

str
the string to decode

Rückgabe: decoded string

EncodeHtml(string) : string

Encode regular string into html encoded string. Handles <, >, "&.

str
the string to encode

Rückgabe: encoded string

IsSingleTag(string) : bool

Is the given html tag is single tag or can have content.

tagName
the tag to check (must be lower case)

Rückgabe: true - is single tag, false - otherwise

Felder

_decodeOnly : Dictionary<string, char>

the html decode only pairs

_encodeDecode : KeyValuePair<string, string>[]

the html encode\decode pairs

_list : List<string>

List of html tags that don't have content