Support » Plugin: User Role Editor » [Plugin: User Role Editor] Space not allowed in role name

  • 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

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulia



    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Role Editor] Space not allowed in role name’ is closed to new replies.