Getting Turkish alphabet characters in the URL field in webbrowser

The function [sanitize_title()][1] generates slugs. This function makes a subsequent call to remove_accents(). This function is found in /wp-includes/formatting.php and includes a map of all character conversions (just FYI).

This only occurs in the “save” context of sanitize_title() which is the default.

Removing accents is not necessary, but it helps ensure the posts slug only contains certain characters. To replace this, you will have to build your own remove_accents() that includes Turkish special characters.

Assuming you’ve done this and called it my_remove_accents(), let’s move forward.

function my_sanitize_title( $title, $raw_title ) {
    return my_remove_accents( sanitize_title_with_dashes( $raw_title ) );
}
add_filter( 'sanitize_title', 'my_sanitize_title', 99, 2 );

sanitize_title_with_dashes() is added to the sanitize_title filter rather than being called from the sanitize_title() function. Calling this function does not replace any accented characters.