Page MenuHomePhabricator

Keep anchor when generating reference from URL
Open, NormalPublic

Description

E.g. https://net.jogtar.hu/jogszabaly?docid=A1200001.TV#pr575id will result in

[
  {
    "key": "RS78AC8V",
    "version": 0,
    "itemType": "webpage",
    "tags": [],
    "title": "2012. évi I. törvény - 1.oldal - Hatályos Jogszabályok Gyűjteménye",
    "url": "https://net.jogtar.hu/jogszabaly?docid=A1200001.TV",
    "abstractNote": "a munka törvénykönyvéről",
    "language": "en",
    "accessDate": "2018-12-25",
    "websiteTitle": "net.jogtar.hu",
    "author": [
      [
        "Wolters Kluwer Hungary",
        "Kft"
      ]
    ],
    "source": [
      "Zotero"
    ]
  }
]

Note how #pr575id is not present in the URL.

Event Timeline

Tgr created this task.Dec 25 2018, 6:56 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 25 2018, 6:56 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mvolz renamed this task from Citoid drops anchor when generating cite web reference to Keep anchor when generating reference from URL.Mar 7 2019, 2:52 PM
Mvolz triaged this task as Normal priority.
Mvolz added a subscriber: Mvolz.Mar 7 2019, 6:57 PM

Somewhat amusingly, the anchor is kept in the DOI (when it shouldn't be) but not the url with this one: https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/https%3A%2F%2Fwww.jstor.org%2Fstable%2F10.14321%2Frhetpublaffa.21.2.0279%3Fseq%3D1%23page_scan_tab_contents

Ideally a solution would be to handle anchors in a way here that also avoids adding it to the doi. Unfortunately the doi spec allows hashes but it's still probably avoidable in most cases.