Commit 63d7fa3e authored by Son Nguyen's avatar Son Nguyen Committed by Cecilia Vela Gurovic
Browse files

Bug 1759367: Cherry-pick for Allow CSS comments in customised skins.

Cherry pick of Bug 1369830 for the upgrade of html purifier to 4.10.0 

As we add a new configuration option to HTML Purifier,
we have to update HTMLPurifier/ConfigSchema/schema.ser
 1. Download and unzip HTMLPurifier package
 2. Copy Filter.ExtractStyleBlocks.PreserveCSS.txt
from mahara to the unzip folder
 3. Run php maintenance/generate-schema-cache.php in
unzup folder
 4. Copy over lib/HTMLPurifier/ConfigSchema/schema.ser
from unzip folder to mahara


Change-Id: I42618f0998425d20f7732843af8a700260c8d96e
parent 031b0671
......@@ -121,6 +121,10 @@ class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter
public function cleanCSS($css, $config, $context)
if ($config->get('Filter.ExtractStyleBlocks.PreserveCSS')) {
$this->_tidy->set_cfg('preserve_css', true);
// prepare scope
$scope = $config->get('Filter.ExtractStyleBlocks.Scope');
if ($scope !== null) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment