Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve relative URIs against their base #955

Merged
merged 1 commit into from
Jan 22, 2019

Commits on Jan 22, 2019

  1. fix: resolve relative URIs against their base

    - re-implement the `PathUtil` class to fix various URI resolution issues
    - remove the 3-arg `resolveRelativeReference` method
    - systematically resolve URI references in Content Documents against the
      base URI
    - the base URI is initially set to the document path, and overriden with
      `xml:base` attributes or HTML’s `base` element
    - add more exhaustive tests for URI normalization/resolution logic
    
    What this PR doesn’t do:
    
    - cleanup the many uses of paths strings, where we should really use URIs.
      The `PathUtil` code is mostly a hack, when we should rely on more robust
      URI normalization/resolution logic from URIs.
    - implement proper base resolution logic (`xml:base` should be deprecated,
      and only the first `base` element should be taken into account).
      See also w3c/epub-specs#1217.
    
    Fixes #527
    rdeltour committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    a84e08c View commit details
    Browse the repository at this point in the history