Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter topquark

    (@topquark)

    I fixed the problem by updating the regular expression in the sanitize_user function in wp-includes/functions-formatting.php to allow backslashes.

    Updated
    $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);

    To
    $username = preg_replace('|[^a-z0-9 _.\-@\\\\]|i', '', $username);

    For those not wanting to modify the WordPress code, I found a similar need wrapped as a WordPress plugin, namely wp-allowdashes. This provided me with a template to create wp-allowbackslashes which can be accessed from here

Viewing 1 replies (of 1 total)