1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 14:16:32 +02:00

Define AttrDef_Text and parseCDATA().

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@160 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-04 03:13:04 +00:00
parent 50b3d5320e
commit 6232221c08
7 changed files with 76 additions and 0 deletions

View File

@@ -8,6 +8,13 @@ class HTMLPurifier_AttrDef
function validate() {
trigger_error('Cannot call abstract function', E_USER_ERROR);
}
function parseCDATA($string) {
$string = trim($string);
$string = str_replace("\n", '', $string);
$string = str_replace(array("\r", "\t"), ' ', $string);
return $string;
}
}
?>