Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Channel names should be generated the same as they are entered in the input. #11388

Closed
roygold7 opened this issue Jul 8, 2018 · 6 comments
Labels
duplicate Closed as Duplicate

Comments

@roygold7
Copy link

roygold7 commented Jul 8, 2018

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
@roeezolantz
Copy link

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.

@TwizzyDizzy
Copy link

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

Cheers
Thomas

@roygold7
Copy link
Author

@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.

@TwizzyDizzy TwizzyDizzy added the duplicate Closed as Duplicate label Jul 16, 2018
@TwizzyDizzy
Copy link

TwizzyDizzy commented Jul 16, 2018

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

@roygold7
Copy link
Author

@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.

@vadipp
Copy link

vadipp commented Mar 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Closed as Duplicate
Projects
None yet
Development

No branches or pull requests

4 participants