protected function escape($value) { if (!is_string($value)) { return $value; } return htmlentities($value, ENT_QUOTES, 'UTF-8'); }