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

Mangled names in highlights #4984

Closed
lheckemann opened this issue Sep 5, 2017 · 11 comments · Fixed by matrix-org/matrix-react-sdk#4411
Closed

Mangled names in highlights #4984

lheckemann opened this issue Sep 5, 2017 · 11 comments · Fixed by matrix-org/matrix-react-sdk#4411
Assignees
Labels
A-Pills Help Wanted Extra attention is needed P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround S-Tolerable Low/no impact on users T-Defect

Comments

@lheckemann
Copy link

lheckemann commented Sep 5, 2017

Description

When I try to highlight a user with square brackets in their name, the resulting message appears mangled. E.g. when I highlighted sphalerite[test] on the IRC Bridges room, it appeared as @freenode_sphalerite%5Btest%5D:matrix.org:
2017-09-05-203655_765x59_scrot
When Mikaela highlighted the same user, it appeared fine:
2017-09-05-204712_1049x185_scrot

I noticed that this difference appears in the source of the messages as well: my highlight had <a href="https://matrix.to/#/@freenode_sphalerite%5Btest%5D:matrix.org"> while Mikaela's had <a href="https://matrix.to/#/@freenode_sphalerite[test]:matrix.org">.

Steps to reproduce

  • Highlight an IRC-bridged user with a name containing square brackets (not tested with regular matrix users)

Expected: appears as sphalerite[test]

Actual: appears as @freenode_sphalerite%5Btest%5D:matrix.org

Log: Sent

Version information

  • Platform: Web app

For the web app:

  • Browser: Firefox 55.0.2
  • OS: NixOS (linux) 17.03
  • URL: riot.im/app and riot.im/staging

Also tested on…

  • Browser: Chromium 60.0.3112.78
  • OS: NixOS (linux) 17.03
  • URL: riot.im/app
@t3chguy
Copy link
Member

t3chguy commented Sep 5, 2017

looks like a state mismatch, could you go into settings scroll to bottom and clear cache and reload
seems like your client doesn't have the displayname of that user and so its falling back to MXID

@lheckemann
Copy link
Author

No, that didn't help.

Full source of an example message:

{
  "origin_server_ts": 1504641691881,
  "sender": "@sphalerite:matrix.org",
  "event_id": "$15046416911557180tqAdP:matrix.org",
  "unsigned": {
    "age": 1028,
    "transaction_id": "m1504641691682.0"
  },
  "content": {
    "body": "sphalerite[test]: ",
    "msgtype": "m.text",
    "formatted_body": "<a href=\"https://matrix.to/#/@freenode_sphalerite%5Btest%5D:matrix.org\">sphalerite[test]</a>:",
    "format": "org.matrix.custom.html"
  },
  "type": "m.room.message",
  "room_id": "!tckjEObrtDIGmCBjwX:matrix.org"
}

@lampholder lampholder added T-Defect S-Tolerable Low/no impact on users S-Major Severely degrades major functionality or product features, with no satisfactory workaround P1 labels Sep 7, 2017
@grahamperrin
Copy link

OK, I found the incident I was seeking. From #4867 (comment) (2017-09-15) affecting /develop/:

2017-09-15 19 44 01 riot 2

Strangely, I have no recollection of the bug biting /app/ at any time in the months since then.

@grahamperrin
Copy link

From the closure of Hilarity ensues when clicking on a user whose display name ends in ] · Issue #5474:

… same cause, lack of escaping, so closing as dup (of 4867)

@Ralith
Copy link

Ralith commented Nov 15, 2018

This has been an issue for more than a year. What is necessary to get riot to stop mangling these? It makes pills a significant regression over historical behavior.

Note that the issue is also triggered by \, and does not manifest in the entry box.

@Ralith
Copy link

Ralith commented Apr 21, 2019

Any hope of a fix in the forseeable future?

@jryans
Copy link
Collaborator

jryans commented Apr 24, 2019

At the moment, this is part of a long backlog of paper cuts, each of which seems important on its own. I'll mark this "help-wanted" to hopefully encourage a PR to be submitted here.

@jryans jryans added the Help Wanted Extra attention is needed label Apr 24, 2019
@Ralith
Copy link

Ralith commented Jul 29, 2019

If this isn't considered a priority, maybe it shouldn't be labeled "major, p1"? It's annoying enough to constantly be hitting this issue, and being led to believe that it's considered important when it's actually very low priority doesn't help.

@jryans jryans added P2 and removed P1 labels Jul 30, 2019
@jryans
Copy link
Collaborator

jryans commented Jul 30, 2019

Nudging down to p2, as that seems to be closer to current priority in practice. It's still quite a bad issue when you hit it, so major seems appropriate.

@jryans
Copy link
Collaborator

jryans commented Jul 30, 2019

(In general though, the issue priorities should be viewed as a very fuzzy relative ordering. We would like to get to the p1 issues before the p2 issues, etc. There's also lots of room to clean up older issues that may no longer apply, etc. Issue tracking is a best effort system that continually evolves over time.)

@Ralith
Copy link

Ralith commented Oct 20, 2020

This is still happening, e.g. with backticks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Pills Help Wanted Extra attention is needed P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround S-Tolerable Low/no impact on users T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants