readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
549 stars 186 forks source link

stylesheet 404 using relative path #758

Closed MoetsukiOtoko closed 2 years ago

MoetsukiOtoko commented 2 years ago

This issue is a Bug

Loading an epub in the browser does not load the stylesheet specified in the xhtml files when relative path is used. Instead of loading the path relative to the xhtml it attempts to load relative to the index html. Using the absolute path works fine.

Observed behaviour

Screenshot from 2022-04-29 21-05-11

Steps to reproduce

  1. Putting unzipped epub files in /epubcontent
  2. Opening via url by appending the folder name to "http://127.0.0.1:8080/dev/index_RequireJS_no-optimize.html?epub=..%25252Fepub_content%252F%"

Test file(s)

https://drive.google.com/drive/u/0/folders/1JRvI7Kav6y78m6t0fC9oIQbXizTUdOKx

Readium cloud reader app latest development build Tested on Chrome and Firefox, Windows and Linux

I hope this is the correct place to put this/tags to use. If not I will remove it, sorry in advance if that is the case,