• Robert Knight's avatar
    Fix annotations made on PDFs in non-Safari browsers not appearing in Safari (#3494) · 134ca864
    Robert Knight authored
    In Safari a trailing '#' is appended to URIs extracted from web
    documents and PDFs. For URLs this makes no difference as the Hypothesis
    search API ignores the fragment identifier. However a URN with a
    trailing '#' is considered different from a URN without a trailing '#'.
    Since the URI for PDFs is now a URN of the form 'urn:x-pdf:...', when
    viewing a PDF in Safari annotations made in other browsers were not
    fetched and vice-versa.
    
    The trailing '#' is caused by a bug in the `URL.hash` setter in Safari.
    
    According to section 6.3 of the URL spec [1], setting URL.hash to an empty
    string should _remove_ the fragment identifier. In Safari however, it
    sets the fragment identifier to an empty string. The result is that when
    the URL is serialized, the output is eg. 'urn:x-pdf:aabb#' instead of
    'urn:x-pdf:aabb'.
    
    Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=158869
    Fixes #3471
    
    [1] https://url.spec.whatwg.org/#urlutils-members
    134ca864
Name
Last commit
Last update
..
annotator Loading commit data...
directive Loading commit data...
filter Loading commit data...
test Loading commit data...
util Loading commit data...
vendor Loading commit data...
admin-site.js Loading commit data...
admin-users.js Loading commit data...
annotation-mapper.js Loading commit data...
annotation-metadata.js Loading commit data...
annotation-sync.coffee Loading commit data...
annotation-ui-controller.js Loading commit data...
annotation-ui-sync.js Loading commit data...
annotation-ui.js Loading commit data...
annotation-viewer-controller.js Loading commit data...
app-controller.js Loading commit data...
app.js Loading commit data...
auth.js Loading commit data...
bridge.coffee Loading commit data...
build-thread.js Loading commit data...
create-group-form.js Loading commit data...
cross-frame.coffee Loading commit data...
date-util.js Loading commit data...
discovery.coffee Loading commit data...
drafts.js Loading commit data...
dropdown-menu.js Loading commit data...
events.js Loading commit data...
features.js Loading commit data...
flash.coffee Loading commit data...
form-respond.coffee Loading commit data...
form-select-onfocus-controller.js Loading commit data...
frame-rpc.js Loading commit data...
groups.js Loading commit data...
host.coffee Loading commit data...
installer-controller.js Loading commit data...
karma-phantomjs-polyfill.js Loading commit data...
karma.config.js Loading commit data...
legacy-site.js Loading commit data...
live-reload-client.js Loading commit data...
local-storage.coffee Loading commit data...
markdown-commands.js Loading commit data...
media-embedder.js Loading commit data...
page.js Loading commit data...
permissions.coffee Loading commit data...
polyfills.js Loading commit data...
query-parser.coffee Loading commit data...
raven.js Loading commit data...
render-markdown.js Loading commit data...
retry-util.js Loading commit data...
root-thread.js Loading commit data...
search-client.js Loading commit data...
search-filter.coffee Loading commit data...
session.js Loading commit data...
settings.js Loading commit data...
site.js Loading commit data...
store.js Loading commit data...
stream-controller.coffee Loading commit data...
stream-filter.coffee Loading commit data...
streamer.js Loading commit data...
tags.coffee Loading commit data...
time.js Loading commit data...
tsconfig.json Loading commit data...
ua-detect.js Loading commit data...
unicode.coffee Loading commit data...
view-filter.coffee Loading commit data...
virtual-thread-list.js Loading commit data...
websocket.js Loading commit data...
widget-controller.js Loading commit data...