hypothesis / hypothesis/product-backlog
Activity pages not rendering url with () correctly
- Dominant language
- No language data
- Stars
- 122
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Reported via our [open Google group](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/hypothesis-forum/aWtFhhzJ0TI/MqrscIZdEAAJ) and [logged in Zendesk](https://hypothesis.zendesk.com/agent/tickets/2913).
### Steps to reproduce
1. Annotate a publicly-available document or web page [like this one](https://www.ncbi.nlm.nih.gov/pubmed/12559372#annotations:B8C-OKoHEeitib8hAMtSeQ)
2. In your annotation, hyperlink another document or page which has parentheses in its url, for example: https://www.jpsmjournal.com/article/S0885-3924(98)00084-0/fulltext
3. View the annotation on your activity page
### Expected behaviour
The hyperlink should render on your activity page the same way it's rendered in the client. You should be able to click the link to view the hyperlinked document/page.
### Actual behaviour
Activity pages will cut off the link such that the closing parenthesis in the URL will be treated as the end of the link. For example,
`https://www.jpsmjournal.com/article/S0885-3924(98)00084-0/fulltext` becomes `https://www.jpsmjournal.com/article/S0885-3924(98)` and the rest of the URL is in plain text next to it. Clicking the link will not bring you to the correct url.
See screenshot below:

However, the linking works properly in the client:

### Browser/system information
The user who reported this did not specify browser/OS info, but I was able to reproduce in Chrome for Mac.
### Additional details
See this in action with the user's public annotation: https://www.ncbi.nlm.nih.gov/pubmed/12559372#annotations:B8C-OKoHEeitib8hAMtSeQ
See it on their activity page: https://hypothes.is/users/Drugs_and_Ethics?q=url%3Ahttps%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpubmed%2F12559372
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue on the linked activity page with a URL containing parentheses, then inspect how activity pages and the client turn annotation text into links. Done means the complete URL is rendered as one clickable link on the activity page, matching the client behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100