WordPress at a glance
function is not described

sanitize_category() WP 2.3.0

Sanitizes category data based on context.

No Hooks.

Return

Object/Array. Same type as $category with sanitized data for safe use.

Usage

sanitize_category( $category, $context );
$category(object/array) (required)
Category data
$context(string)
Optional.
Default: 'display'

Code of sanitize category: wp-includes/category.php VER 5.1.1

<?php
function sanitize_category( $category, $context = 'display' ) {
	return sanitize_term( $category, 'category', $context );
}