final class Escaper

Context-aware escaping.

Constants

Text

JavaScript

Css

ICal

Url

HtmlText

HtmlComment

HtmlBogusTag

HtmlRawText

HtmlTag

HtmlAttribute

private Convertors

Methods

__construct(string $contentType)

No description

string
getContentType()

No description

string
getState()

No description

string
export()

No description

void
enterContentType(string $type)

No description

void
enterHtmlText(ElementNode $el)

No description

void
enterHtmlTag(string $name)

No description

void
enterHtmlRaw(string $subType)

No description

void
enterHtmlAttribute(string|null $name = null)

No description

void
enterHtmlBogusTag()

No description

void
enterHtmlComment()

No description

string
escape(string $str)

No description

string
escapeMandatory(string $str)

No description

string
check(string $str)

No description

static callable|null
getConvertor(string $source, string $dest)

No description

Details

at line 84
__construct(string $contentType)

No description

Parameters

string $contentType

at line 93
string getContentType()

No description

Return Value

string

at line 99
string getState()

No description

Return Value

string

at line 105
string export()

No description

Return Value

string

at line 111
void enterContentType(string $type)

No description

Parameters

string $type

Return Value

void

at line 117
void enterHtmlText(ElementNode $el)

No description

Parameters

ElementNode $el

Return Value

void

at line 144
void enterHtmlTag(string $name)

No description

Parameters

string $name

Return Value

void

at line 151
void enterHtmlRaw(string $subType)

No description

Parameters

string $subType

Return Value

void

at line 158
void enterHtmlAttribute(string|null $name = null)

No description

Parameters

string|null $name

Return Value

void

at line 178
void enterHtmlBogusTag()

No description

Return Value

void

at line 184
void enterHtmlComment()

No description

Return Value

void

at line 190
string escape(string $str)

No description

Parameters

string $str

Return Value

string

at line 229
string escapeMandatory(string $str)

No description

Parameters

string $str

Return Value

string

at line 251
string check(string $str)

No description

Parameters

string $str

Return Value

string

at line 260
static callable|null getConvertor(string $source, string $dest)

No description

Parameters

string $source
string $dest

Return Value

callable|null