Guilds icon indicating copy to clipboard operation
Guilds copied to clipboard

If `include-color-codes: false` is set in configs, regex doesn't check `&` character.

Open wolfebersahd opened this issue 5 years ago • 1 comments

Description

Setting include-color-codes: to false in the config makes regex not check for the & character.

Expected Behavior

Regex should check for & character regardless if include-color-codes: is set to true or false.

Actual Behavior

Regex doesn't check & character when include-color-codes: is set to false

Steps to Reproduce

  1. Set include-color-codes: to false in config
  2. Remove & from prefix regex similar to the config excerpt below.
        name: '[a-zA-Z0-9&]{1,64}'
        # Similar to the name, just refer above.
        prefix: '[a-zA-Z0-9]{1,20}'
        # Would you like to include color codes signs (&b &l, etc) in the length check?
        include-color-codes: false
  1. Attempt to add a & code to the prefix in game.

Context

This bug prevents players from prohibiting & code in names and prefixes, while excluding them in the length check.

Your Environment

  • Guilds version: Latest 3537
  • MC Version: Paper 1.14.4
  • Plugin List: Capture2

wolfebersahd avatar Nov 17 '19 00:11 wolfebersahd

I presume this is not an issue anymore?

VQ9 avatar Sep 02 '21 21:09 VQ9