hypothesis / hypothesis/product-backlog
add application/rdf+xml and application/opml+xml to list of ignored types for rel="alternate"
- Dominant language
- No language data
- Stars
- 122
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Annotations were aliased across a bunch of subdomains of hypotheses.org:

Here is part of the problem. When the client acquires metadata at *.hypotheses.org it includes:
`{href: "https://vertigo.hypotheses.org/feed/rdf", rel: "alternate", type: "application/rdf+xml"}`
We intend to ignore rel="alternate" declarations that point to feeds. However we only exclude the patterns `application/rss+xml` and `application/atom+xml`:
https://github.com/hypothesis/client/blob/734e3a25318364819a8c38ef881e4788a2b06365/src/annotator/plugin/document.js#L180
We should also exclude `application/rdf+xml`.
But that only explains why, e.g., everything at vertigo.hypotheses.org collapsed into https://vertigo.hypotheses.org/feed/rd`.
How did other domains like sms.hypotheses.org also collapse into the same bucket? The culprit is here:
`{href: "https://www.openedition.org/opml.php?pubtype=carnet", rel: "alternate", type: "application/opml+xml"}`
So we should also exclude `application/opml+xml`. That declaration is common to all the *.hypotheses.org domains.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/annotator/plugin/document.js at the rel="alternate" feed-type filtering described in the issue. Add the two named MIME types to the ignored list and verify that RDF and OPML alternate declarations are no longer treated as document metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100