[Bug] The exit keywords editor allows symbols that cannot be used as keywords

The most common typo I’ve seen is people adding a peroid to the end of keywords, e.g. back, street, outside. which makes outside. a broken keyword.

But really, you can add a whole bunch of other punctuation, like holy wine :d, which is a valid keyword that you can’t use.

Can we either disallow those symbols or strip them on save?

3 Likes

To be completely honest, I use the “valid but invalid” keywords to lock exits that shouldn’t be used yet :sweat_smile:

1 Like

Mmmm. Yes.
There is a discrepancy on what characters the client believes are allowed, and what the server allows.
And the server is actually much too permissive.

What would be a good set of characters allowed in keywords?

I am considering a similar treatment as with character names, adding lowercasing and stripping of marks (eg. turning äa or ée):

  • Only allow Unicode letters (L), numbers (N), space, dash (-), or apostrophe (')
  • Strip away hangul filler characters (or other banned letters)
  • Convert Unicode White Space characters into space
  • Collapse consecutive spaces into a single space
  • Trim space from start and end
  • Lower-case any character that can be lower-cased.
  • Stripping any Unicode mark (Mn) after NFKD normalization.

Or to put it simple:

Only allow, lowercase letters without diacritics or other marks, numbers, normal space, dash and apostrophes.

The reason for limiting it to letters and numbers is to allow us to have commands such as:

go north, west, over the bridge

Comma is then a clear separator, since it cannot be used in the keyword.

And comment on that suggestion?

Edit

I made a quick scan of existing tags. It seems other common characters are:

  • Slash (/). Used as “or” when combining similar. Example: feet/paws
  • Parenthesis. Used for modfiying. Example: massage (giving)
  • And. Used as “and” when combining similar. Example: love & peace
  • Plus. Used also a combiner, but also as modifier. Example: 18+
  • Other characters. Example: c#, dogs > cats, adventure!, 100%

Okay. Maybe tags should have their own set of allowed characters as the purpose of tag names differs from exit/profile/teleport keywords.

1 Like

Created a GitHub issue:

1 Like