WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
Space not allowed in role name (2 posts)

  1. gmangesh
    Member
    Posted 1 year ago #

    Hi,

    I get the following popup error when I try to add a role with a space in the role names.

    "Role Name must contain latin characters and digits only"

    WordPress allows spaces in names - so URE should also allow spaces in names.

    To allow spaces, I added a space in the regular expression used in line 104 of includes/ure-role-edit.php:

    if (!(/^[\w- ]*$/.test(value)))

    Similar checks are also performed in includes/ure-lib.php

    http://wordpress.org/extend/plugins/user-role-editor/

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your suggestion. I excluded spaces from role name purposefully. Yes, WordPress allows spaces in role names. But does it uses them really? May be it just doesn't make needed checking.

    At earlier versions I excluded the '-' (hyphen) too and roles names could be valid programming language identifier only. Hyphens are allowed now. But I still do not wish allow spaces :) with my tool.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.