mirror of
https://github.com/moodle/moodle.git
synced 2025-07-27 09:20:36 +02:00
Prior to this change, all the line endings in the imported HTMLPurifier library were using CRLF (\r\n aka Windows style), but the HTMLPurifier source and also the downloadable artefacts use LF (\n aka Linux style) as line endings. This has been the case since510d190382
when with the commit "MDL-38672 import HTML Purifier 4.5.0" all line endings were changed from LF to CRLF. There was no comment in the commit on why this change was done. As the original source uses LF, this commit partly reverts510d190382
and goes back to LF as line endings. Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
HTML.DefinitionID
|
|
TYPE: string/null
|
|
DEFAULT: NULL
|
|
VERSION: 2.0.0
|
|
--DESCRIPTION--
|
|
|
|
<p>
|
|
Unique identifier for a custom-built HTML definition. If you edit
|
|
the raw version of the HTMLDefinition, introducing changes that the
|
|
configuration object does not reflect, you must specify this variable.
|
|
If you change your custom edits, you should change this directive, or
|
|
clear your cache. Example:
|
|
</p>
|
|
<pre>
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
$config->set('HTML', 'DefinitionID', '1');
|
|
$def = $config->getHTMLDefinition();
|
|
$def->addAttribute('a', 'tabindex', 'Number');
|
|
</pre>
|
|
<p>
|
|
In the above example, the configuration is still at the defaults, but
|
|
using the advanced API, an extra attribute has been added. The
|
|
configuration object normally has no way of knowing that this change
|
|
has taken place, so it needs an extra directive: %HTML.DefinitionID.
|
|
If someone else attempts to use the default configuration, these two
|
|
pieces of code will not clobber each other in the cache, since one has
|
|
an extra directive attached to it.
|
|
</p>
|
|
<p>
|
|
You <em>must</em> specify a value to this directive to use the
|
|
advanced API features.
|
|
</p>
|
|
--# vim: et sw=4 sts=4
|