MDL-14894 html purifier updated, merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2008-05-19 06:24:33 +00:00
parent b9b17c8a30
commit 14913ca4d5
27 changed files with 355 additions and 112 deletions
@@ -82,5 +82,13 @@ class HTMLPurifier_AttrDef
return $this;
}
/**
* Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work
* properly. THIS IS A HACK!
*/
function mungeRgb($string) {
return preg_replace('/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\)/', 'rgb(\1,\2,\3)', $string);
}
}