Reply To: [Resolved] replace %20% usernames with a dash (-) in URL?
Hi @halo-diehard,
put it into bp-custom.php
Reference:
The %20 sanitizing thing is already used. And answer is in the snippet.
This is actually in /bp-legacy/buddypress-functions.php
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {
if ( bp_is_username_compatibility_mode() ) {
// Sanitize for spaces. Use urlencode() rather
// than rawurlencode() because %20 breaks JS
$username = urlencode( $user->user_login );
} else {
$username = $user->user_nicename;
}