General developer forum

Configure / change behaviour of HTML Purifier

 
Picture of Stefan Beyer
Configure / change behaviour of HTML Purifier
 

Is there any kind of interface to modify the behaviour of the htmlpurifier without hacking the moodle core?

The configuration (allowed tags and attributes) seems to be mostly hard coded in purify_html() in lib/weblib.php.

Why do I want this? I want to allow for ex. "data-xxxx" attributes, used by different JS-UI-Components without disabling the code cleaning entirely! 

(I'm talking about Moodle 3.1.2 (Build: 20160912))

Thank's for some input.

 
Average of ratings: -
Picture of Steffen Hippeli
Re: Configure / change behaviour of HTML Purifier
Plugin developers

Hi Stefan, did you find a solution for your problem? I am looking for one, too smile

 
Average of ratings: -