$_xhtml
$_xhtml : string
Storage for resulting HTML output
SafeHTML Parser
This parser strips down all potentially dangerous content within HTML:
It also tries to convert code to XHTML valid, but htmltidy is far better solution for this task.
Example:
$parser =& new SafeHTML(); $result = $parser->parse($doc);
$closeParagraph : array
List of block-level tags that terminates paragraph
Paragraph will be closed when this tags opened
None found |
$tableTags : array
List of table tags, all table tags outside a table will be removed
None found |
None found |
_writeAttrs(array $attrs) : boolean
Handles the writing of attributes - called from $this->_openHandler()
array | $attrs | array of attributes $name => $value |
None found |
_openHandler(object $parser, string $name, array $attrs) : boolean
Opening tag handler - called from HTMLSax
object | $parser | HTML Parser |
string | $name | tag name |
array | $attrs | tag attributes |
None found |
_closeHandler( $parser, string $name) : boolean
Closing tag handler - called from HTMLSax
$parser | ||
string | $name | tag name |
None found |
_closeTag(string $tag) : boolean
Closes tag
string | $tag | tag name |
None found |
_dataHandler(object $parser, string $data) : boolean
Character data handler - called from HTMLSax
object | $parser | HTML parser |
string | $data | textual data |
None found |
_escapeHandler(object $parser, string $data) : boolean
Escape handler - called from HTMLSax
object | $parser | HTML parser |
string | $data | comments or other type of data |
None found |
getXHTML() : string
Returns the XHTML document
Processed (X)HTML document
None found |
parse(string $doc) : string
Main parsing fuction
string | $doc | HTML document for processing |
Processed (X)HTML document
None found |
repackUTF7(string $str) : string
UTF-7 decoding fuction
string | $str | HTML document for recode ASCII part of UTF-7 back to ASCII |
Decoded document
None found |