hypothesis / hypothesis/client

annotation fails for tweet with camelcased username

Open
#706 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Mustache
Stars
730
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Sample tweet: https://twitter.com/realDonaldTrump/status/979326715272065024

**Annotation**: https://hypothes.is/api/search?uri=https://twitter.com/realDonaldTrump/status/979326715272065024

**Expected result**: Annotation appears in H client at the tweet URL

**What happens**: It doesn't

**Why not**: Twitter declares:

``

so the client's search ends up being

`https://hypothes.is/api/search?uri=https://twitter.com/realdonaldtrump/status/979326715272065024`

which fails.

**Possible solution**: When the search URI obtained from the target page is a case-insensitive match for the `rel="canonical"`, include both in the set of URIs the client searches for.

Here's where such an intervention might happen:

https://github.com/hypothesis/client/blob/2578fefde9011a907411e1b75bad93d04b539445/src/sidebar/store/modules/frames.js#L74

Both variants are available in that context:

![image](https://user-images.githubusercontent.com/46509/38205649-2fcef29c-365c-11e8-83cb-fc4f16c22555.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.