/** * Ensure an ID contains only alphanumeric characters, dots, dashes, or underscores * * @param string $id the ID to sanitize * @param boolean $new_id true = create a new ID in case we end up with an empty string * @return string the sanitized ID */ function COM_sanitizeID($id, $new_id = true) { $filter = new sanitizer(); return $filter->sanitizeID($id, $new_id); }