0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-23 22:01:53 +00:00

MOODLE-556: Created Math module with tag parsing

This commit is contained in:
Xavier Ripoll 2018-09-28 14:37:49 +02:00
parent a93250f251
commit 74f5485d2a
6 changed files with 1737 additions and 0 deletions

View File

@ -238,6 +238,11 @@
<line>279</line> <line>279</line>
</file> </file>
</directive> </directive>
<directive id="HTML.Math">
<file name="HTMLPurifier/HTMLModuleManager.php">
<line>282</line>
</file>
</directive>
<directive id="Attr.IDBlacklist"> <directive id="Attr.IDBlacklist">
<file name="HTMLPurifier/IDAccumulator.php"> <file name="HTMLPurifier/IDAccumulator.php">
<line>27</line> <line>27</line>

View File

@ -162,6 +162,7 @@ require 'HTMLPurifier/HTMLModule/Iframe.php';
require 'HTMLPurifier/HTMLModule/Image.php'; require 'HTMLPurifier/HTMLModule/Image.php';
require 'HTMLPurifier/HTMLModule/Legacy.php'; require 'HTMLPurifier/HTMLModule/Legacy.php';
require 'HTMLPurifier/HTMLModule/List.php'; require 'HTMLPurifier/HTMLModule/List.php';
require 'HTMLPurifier/HTMLModule/Math.php';
require 'HTMLPurifier/HTMLModule/Name.php'; require 'HTMLPurifier/HTMLModule/Name.php';
require 'HTMLPurifier/HTMLModule/Nofollow.php'; require 'HTMLPurifier/HTMLModule/Nofollow.php';
require 'HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; require 'HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php';

View File

@ -156,6 +156,7 @@ require_once $__dir . '/HTMLPurifier/HTMLModule/Iframe.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/List.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/List.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Math.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Nofollow.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/Nofollow.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php';

View File

@ -0,0 +1,7 @@
HTML.Math
TYPE: bool
DEFAULT: false
--DESCRIPTION--
<p>
MathML.</p>
--# vim: et sw=4 sts=4

File diff suppressed because it is too large Load Diff

View File

@ -279,6 +279,9 @@ class HTMLPurifier_HTMLModuleManager
if ($config->get('HTML.TargetNoopener')) { if ($config->get('HTML.TargetNoopener')) {
$modules[] = 'TargetNoopener'; $modules[] = 'TargetNoopener';
} }
if ($config->get('HTML.Math')) {
$modules[] = 'Math';
}
// merge in custom modules // merge in custom modules
$modules = array_merge($modules, $this->userModules); $modules = array_merge($modules, $this->userModules);