Public feed
#604399
function bb_user_sanitize( $text, $strict = false ) {
$raw = $text;
if ( $strict ) {
$text = preg_replace('/[^a-z0-9-]/i', '', $text);
$text = preg_replace('|-+|', '-', $text);
} else
$text = preg_replace('/[^a-z0-9_-]/i', '', $text); // For backward compatibility.
return apply_filters( 'bb_user_sanitize', $text, $raw, $strict );
}