Sanitizes a title with the ‘query’ context.

Used for querying the database for a value from URL.

Signature

sanitize_title_for_query( $title )
title
 (string) The string to be sanitized.

Return

(string) The sanitized string.

Source

function sanitize_title_for_query( $title ) {
	return sanitize_title( $title, '', 'query' );
}
WP Trac GitHub

Link here