Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

URLs that contain an encoded slash character (%2F) are not handled correctly #510

Open
balcy opened this issue Aug 8, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@balcy
Copy link
Collaborator

balcy commented Aug 8, 2021

Expected Result:
The page should reload, the URL should not change
Actual result:

The same issue is when the browser is restored:

Another instance:

(%2F was replaced by /)

@balcy balcy self-assigned this Aug 8, 2021
@balcy
Copy link
Collaborator Author

balcy commented Aug 8, 2021

in those cases the QML url type is used, which works well when initialized from a QUrl, and in most cases when initialized from a string, but there is an exception with the percent encoded slash (%2F)

https://doc.qt.io/qt-5/qml-url.html

Additionally, URLs may contain encoded characters using the 'percent-encoding' scheme specified by RFC 3986. These characters will be preserved within properties of type url, to allow QML code to construct precise URL values. An exception to this rule is the preemptive decoding of directory-separator characters ('/') - these characters are decoded to allow the URL to be correctly classified.

The proposed solution is to use the newly created UrlUtils class (C++ backend) instead of UrlUtils.js

@balcy balcy added the bug Something isn't working label Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant