Generates HTML from tokens.
- A faire:
Refactor interface so that configuration/context is determined upon instantiation, no need for messy generateFromTokens() calls
Make some of the more internal functions protected, and have unit tests work around that
◆ __construct()
__construct |
( |
|
$config, |
|
|
|
$context |
|
) |
| |
◆ escape()
escape |
( |
|
$string, |
|
|
|
$quote = null |
|
) |
| |
Escapes raw text data.
- A faire:
- This really ought to be protected, but until we have a facility for properly generating HTML here w/o using tokens, it stays public.
- Paramètres
-
string | $string | String data to escape for HTML. |
int | $quote | Quoting style, like htmlspecialchars. ENT_NOQUOTES is permissible for non-attribute output. |
- Renvoie
- string escaped data.
◆ generateAttributes()
generateAttributes |
( |
|
$assoc_array_of_attributes, |
|
|
|
$element = '' |
|
) |
| |
Generates attribute declarations from attribute array.
- Note
- This does not include the leading or trailing space.
- Paramètres
-
array | $assoc_array_of_attributes | Attribute array |
string | $element | Name of element attributes are for, used to check attribute minimization. |
- Renvoie
- string Generated HTML fragment for insertion.
◆ generateFromToken()
generateFromToken |
( |
|
$token | ) |
|
Generates HTML from a single token.
- Paramètres
-
- Renvoie
- string Generated HTML
◆ generateFromTokens()
generateFromTokens |
( |
|
$tokens | ) |
|
Generates HTML from an array of tokens.
- Paramètres
-
- Renvoie
- string Generated HTML
◆ generateScriptFromToken()
generateScriptFromToken |
( |
|
$token | ) |
|
Special case processor for the contents of script tags
- Paramètres
-
- Renvoie
- string
- Avertissement
- This runs into problems if there's already a literal --> somewhere inside the script contents.
◆ $_def
Cache of HTMLDefinition during HTML output to determine whether or not attributes should be minimized. @type HTMLPurifier_HTMLDefinition
◆ $_flashCompat
Cache of Output.FlashCompat. @type bool
◆ $_flashStack
Stack for keeping track of object information when outputting IE compatibility code. @type array
◆ $_innerHTMLFix
Cache of Output.FixInnerHTML. @type bool
◆ $_scriptFix
:HACK: Whether or not generator should comment the insides of <script> tags. @type bool
◆ $_sortAttr
Cache of Output.SortAttr. @type bool
◆ $_xhtml
Whether or not generator should produce XML output. @type bool
◆ $config
La documentation de cette classe a été générée à partir du fichier suivant :
- XoopsCore25-2.5.11-Beta1/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Generator.php