메소드 |
설명 |
|
__construct ( ) |
Constructor preventing from creating instances of a static class. |
|
fromText ( string $text, boolean $convertLinks = true ) : string |
Converts text to HTML source code. |
|
getBody ( string $html ) : string |
Returns contents from the given HTML source. |
|
is ( string $text ) : boolean |
Tests if the given text contains at least one HTML tag. |
|
linkFromText ( string $text ) : string |
Converts text to a link to an url or email. |
|
removeAttributes ( string $html, array $attributes = [] ) : string |
Removes given attributes from the HTML source. |
|
removeDangerous ( string $html ) : string |
Removes possibly dangerous attributes that could contain XSS code from the HTML source. |
|
removeInnerTags ( string $html, string $tag ) : string |
Removes tags of the same type nested into each other from the HTML source. |
|
removeJavascriptEvents ( string $html ) : string |
Removes all javascript events from the HTML source. |
|
removeRemoteImages ( string $html ) : string |
Removes foreign images from the HTML source. |
|
removeTags ( string $html, array $tags = [] ) : string |
Removes given tags from the HTML source. |
|
repair ( string $html ) : string |
Fixes an invalid HTML source, unifies quotes and removes unnecessary whitespace. |
|
toText ( string $html ) : string |
Converts HTML source code to plaintext. |
|