Git Product home page Git Product logo

Comments (4)

loichuder avatar loichuder commented on June 12, 2024 1

Fixed by silx-kit/h5web#774 and silx-kit/h5web#781

from jupyterlab-h5web.

t20100 avatar t20100 commented on June 12, 2024

Probably need to use quote_plus

from jupyterlab-h5web.

t20100 avatar t20100 commented on June 12, 2024

Issue is also when opening h5web with a double click from the file browser.

from jupyterlab-h5web.

loichuder avatar loichuder commented on June 12, 2024

After thorough investigation, the escaping happens when the request URL is parsed on the backend. The culprit is tornado's parse_qs_bytes that parses arguments expecting them to be URL-encoded.

>>> parse_qs_bytes('file=stack+.h5&path=/')
{'file': [b'stack .h5'], 'path': [b'/']}
>>> parse_qs_bytes('file=stack%2B.h5&path=%2F')
{'file': [b'stack+.h5'], 'path': [b'/']}

To avoid problems of this type in the future, we should ensure that the filename is encoded every time it roundtrips between the front-end and the back-end.

This means encoding should happen in the following situations:

  • When double-clicking on a file in the filebrowser. This is probably handled directly by JupyterLab.
  • When passing the filename in argument of the H5Web widget. #46 may be the solution This is probably also handled by JupyterLab as it works without further work in jupyterlab-h5web
  • When making GET requests in the H5GroveProvider with filename as arg. This must be fixed in h5web silx-kit/h5web#774.

from jupyterlab-h5web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.