public function cdata($text) { if (!seems_utf8($text)) { $text = utf8_encode($text); } return parent::cdata($text); }