RocketChat / RocketChat/Rocket.Chat

Apostrophe-containing URL preview misparsed

Open
#15,858 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Slightly different incarnation reported as #9976

Pasted URL previews mistakenly get truncated at apostrophes, although this is a valid character in an URL according to RFC 3986

Server Setup Information:
  • Version of Rocket.Chat Server: 2.2.0
  • Operating System: CentOS Linux release 7.7.1908 (Core)
  • Deployment Method(snap/docker/tar/etc): tar
  • Number of Running Instances: 20
  • DB Replicaset Oplog: enabled
  • Node Version: v8.15.1
  • mongoDB Version: mongodb-org-server-3.6.15-1.el7.x86_64
Steps to Reproduce:
  1. Paste URL containing apostrophe, eg. https://en.wikipedia.org/wiki/Devil's_advocate
  2. Observe preview
  3. Access URL by clicking it
Expected behavior:

The preview should be for the Wikipedia page containing the apostrophe, eg. "Devil's advocate"

Actual behavior:

The preview ends up being truncated at the apostrophe, eg. for the Wikipedia page "Devil"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Reproduce the URL preview with https://en.wikipedia.org/wiki/Devil's_advocate, then trace the URL-preview handling from the pasted chat message; done means the preview and link preserve the full URL through the apostrophe.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.