Rocket.chat: [BUG] Channel names should be generated the same as they are entered in the input.

Created on 8 Jul 2018  路  6Comments  路  Source: RocketChat/Rocket.Chat

Description:

When creating a channel, entering a name with spaces in the channel name input and then clicking "Create" generates a name with dashes (-) in place of the spaces.

The channel appears in the list with the dashes but when opened, the name is displayed on the top as it was entered in the input field.

Also in the info side popup, the name appears with dashes but when clicking "Edit", it appears as originally entered.

The URL also displays the name with dashes.

image

Trying to create a new channel but with dashes instead of spaces will display an error saying the name already exists.

It appears this issue has been solved in previous versions but has popped up again.

Relevant issues:

7595

7488

Steps to reproduce:

  1. Go to Administration > Layout > User Interface > Allow Special Characters in Room Names - set to true.
  2. Create a channel and use spaces in the name.
  3. Open the channel chat and click on the info icon in the top right corner. Observe the name and click Edit.

Expected behavior:

The name should be displayed consistently in all places.

Rocket should be able to have a channel named "test name" and "test-name" without a problem.

Creating a channel should not generate a channel with a different name to what was entered by the user in the input.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.66.0
  • Operating System: Fedora 28
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Disabled
  • NodeJS Version: official Docker container
  • MongoDB Version: official Docker container
duplicate

All 6 comments

This issue also affects me, both in this and in earlier server versions.
My users complains about this inconsistency specially when combining it with UTF-8 regex for Hebrew support.

Correct me if I'm wrong, but this is a duplicate of #9738, isn't it?

Cheers
Thomas

@TwizzyDizzy

It covers the same problem with the inconsistent display of the channel name bug but I also mentioned that you can't create a group with the same name except with dashes instead of spaces.

but I also mentioned that you can't create a group with the same name except with dashes instead of spaces.

Well... indeed this is counter-intuitive but I guess what happens under the hood is the following:

  • All non-URL-compatible characters are replaced by dashes
  • The name of the room you want to create is compared against the "sanitized" version of the room name

So: from a comparison perspective of the sanitized string, "my room name", "my$room$name" and "my-room-name" all get sanitized to "my-room-name".

Why do we need to do this:

  • the room name is used in URLs
  • some characters are simply not compatible with URLs

That's why I'm closing this as a duplicate.

Cheers (+close)
Thomas

@TwizzyDizzy This seems limiting and is not conventional for chats.
Why not just use an encoded URL instead of sanitising the name? This is the exact use case for encoded URLs.

What about users with Cyrillic, Greek, Chinese or whatever alphabets? They can't even create channels with names in their native language, because there has to be at least one digit or latin letter in the channel name. And it should be unique across all channels. So I just can't create channels like 袪邪蟹褉邪斜芯褌泻邪 or 袩芯写写械褉卸泻邪. It is ok for developers, but not intuitive for other team members who may not know English, or for stakeholders.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antn89 picture antn89  路  3Comments

sta-szek picture sta-szek  路  3Comments

karlprieb picture karlprieb  路  3Comments

djeber picture djeber  路  3Comments

tanc picture tanc  路  3Comments