public static encodeTextForODT ( $text ) : string | ||
$text | ||
return | string |
public static function encodeTextForODT($text)
{
if (is_string($text)) {
return htmlspecialchars($text, ENT_XML1);
}
return $text;
}
public function __construct($name, $data = null) { $this->data['element-type'] = 'simple-text'; $this->data['name'] = $name; if ($data !== null) { $this->data['data'] = ODTDataHandler::encodeTextForODT($data); } }