Invalid text quote selector causes whole page to be highlighted
Steps to reproduce
- Visit https://hyp.is/BvFJGPmpRd-7d6g7_sOpFg/web.hypothes.is or create an annotation via the API which has a similar quote selector to the JSON below.
Expected behaviour
The annotation should fail to anchor.
Actual behaviour
The annotation anchors to the whole page.
Additional details
The annotation has an invalid quote selector:
{
"updated": "2015-06-03T04:15:51.304541+00:00",
"group": "__world__",
"target": [
{
"source": "https://web.hypothes.is",
"selector": [
{
"type": "TextPositionSelector",
"end": null,
"start": null
},
{
"exact": null,
"prefix": null,
"type": "TextQuoteSelector",
"suffix": null
}
]
}
],
"links": {
"json": "https://hypothes.is/api/annotations/BvFJGPmpRd-7d6g7_sOpFg",
"html": "https://hypothes.is/a/BvFJGPmpRd-7d6g7_sOpFg",
"incontext": "https://hyp.is/BvFJGPmpRd-7d6g7_sOpFg/web.hypothes.is"
},
"tags": [],
"text": "testing create in hypothes.is API",
"created": "2015-06-03T04:15:51.304523+00:00",
"uri": "https://web.hypothes.is",
"flagged": false,
"user": "acct:[email protected]",
"hidden": false,
"document": {
"title": [
"Annotating the law | Hypothes.is"
]
},
"consumer": "00000000-0000-0000-0000-000000000000",
"id": "BvFJGPmpRd-7d6g7_sOpFg",
"permissions": {
"read": [
"group:__world__"
],
"admin": [
"acct:[email protected]"
],
"update": [
"acct:[email protected]"
],
"delete": [
"acct:[email protected]"
]
}
}
@robertknight - in your opinion, is this a bug, or technical debt that needs to be fixed?
This is a bug.
Moved back to "To Review" on bug backlog because we're unclear whether this is still a valid bug. If a developer could try to reproduce & let us know if the issue persists, that would be helpful.
That annotation still exists but doesn't get loaded by the client at all when visiting the page https://web.hypothes.is. I've confirmed that it doesn't appear on https://web.hypothes.is/blog/annotating-the-law/ (which is the page on the website whose title matches that in the annotation) and doesn't appear if you're logged into the Hypothesis moderation user account (hypmod).
We'll need to create a new test case to try and reproduce.
I'm closing this issue since it hasn't come up recently and can't be reproduced from the original steps.