mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
MDL-11415 fixed our non-standard lang attributes in html purifier
This commit is contained in:
parent
0352cd2ffa
commit
6510b0f09c
@ -10,6 +10,10 @@ class HTMLPurifier_AttrDef_Lang extends HTMLPurifier_AttrDef
|
||||
{
|
||||
|
||||
function validate($string, $config, &$context) {
|
||||
|
||||
// moodle change - we use special lang strings unfortunatelly
|
||||
return ereg_replace('[^0-9a-zA-Z_-]', '', $string);
|
||||
// moodle change end
|
||||
|
||||
$string = trim($string);
|
||||
if (!$string) return false;
|
||||
|
@ -7,9 +7,11 @@ class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModul
|
||||
var $name = 'XMLCommonAttributes';
|
||||
|
||||
var $attr_collections = array(
|
||||
/* moodle comment - xml:lang breaks our multilang
|
||||
'Lang' => array(
|
||||
'xml:lang' => 'LanguageCode',
|
||||
)
|
||||
*/
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
Description of HTML Purifier v2.1.1 Lite library import into Moodle
|
||||
Description of HTML Purifier v2.1.2 Lite library import into Moodle
|
||||
|
||||
Changes:
|
||||
* Text.php - added nolink, tex, lang and algebra tags
|
||||
* HMLTModule/Text.php - added <nolink>, <tex>, <lang> and <algebra> tags
|
||||
* HMLTModule/XMLCommonAttributes.php - remove xml:lang - needed for multilang
|
||||
* AttrDef/Lang.php - relaxt lang check - needed for multilang
|
||||
|
||||
skodak
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user