C# Class Majestic12.HTMLentities

Implements parsing of entities
显示文件 Open project: arktronic/sevenauth Class Usage Examples

Public Properties

Property Type Description
oAllEntities FastHash
sEntityReverseLookup string[]

Public Methods

Method Description
Dispose ( ) : void

Private Methods

Method Description
ChangeToEntities ( string sLine, int iFrom, bool bChangeDangerousCharsOnly ) : string

Parses line and changes known entiry characters into proper HTML entiries

CheckForEntity ( byte bHTML, int &iCurPos ) : char

This function will be called when & is found, and it will peek forward to check if its entity, should there be a success indicated by non-zero returned, the pointer will be left at the new byte after entity

CheckForEntity ( byte bHTML, int &iCurPos, int iDataLength ) : char
DecodeEntities ( ) : char

This function will decode any entities found in a string - not fast!

DecodeEntities ( string sData ) : string
Dispose ( bool bDisposing ) : void
HTMLentities ( ) : System
InitEntities ( int &iMinEntityLen, int &iMaxEntityLen, string &sEntityReverseLookup ) : FastHash

Initialises list of entities

InitMiniEntities ( ) : void

Inits mini-entities mode: only "nbsp" will be converted into space, all other entities will be left as is

ParseUInt ( byte bBuf, int iFrom, int iLength ) : uint

Parses an unsigned integer number from byte buffer

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Property Details

oAllEntities public_oe static_oe property

Supported HTML entities
public static FastHash,Majestic12 oAllEntities
return FastHash

sEntityReverseLookup public_oe static_oe property

Array to provide reverse lookup for entities
public static string[] sEntityReverseLookup
return string[]