]>
Commit | Line | Data |
---|---|---|
d4949327 NL |
1 | HTML.DefinitionID\r |
2 | TYPE: string/null\r | |
3 | DEFAULT: NULL\r | |
4 | VERSION: 2.0.0\r | |
5 | --DESCRIPTION--\r | |
6 | \r | |
7 | <p>\r | |
8 | Unique identifier for a custom-built HTML definition. If you edit\r | |
9 | the raw version of the HTMLDefinition, introducing changes that the\r | |
10 | configuration object does not reflect, you must specify this variable.\r | |
11 | If you change your custom edits, you should change this directive, or\r | |
12 | clear your cache. Example:\r | |
13 | </p>\r | |
14 | <pre>\r | |
15 | $config = HTMLPurifier_Config::createDefault();\r | |
16 | $config->set('HTML', 'DefinitionID', '1');\r | |
17 | $def = $config->getHTMLDefinition();\r | |
18 | $def->addAttribute('a', 'tabindex', 'Number');\r | |
19 | </pre>\r | |
20 | <p>\r | |
21 | In the above example, the configuration is still at the defaults, but\r | |
22 | using the advanced API, an extra attribute has been added. The\r | |
23 | configuration object normally has no way of knowing that this change\r | |
24 | has taken place, so it needs an extra directive: %HTML.DefinitionID.\r | |
25 | If someone else attempts to use the default configuration, these two\r | |
26 | pieces of code will not clobber each other in the cache, since one has\r | |
27 | an extra directive attached to it.\r | |
28 | </p>\r | |
29 | <p>\r | |
30 | You <em>must</em> specify a value to this directive to use the\r | |
31 | advanced API features.\r | |
32 | </p>\r | |
33 | --# vim: et sw=4 sts=4\r |