Skip to content

Import documents - prevent double quoting#661

Merged
VesnaT merged 2 commits intobiolab:masterfrom
PrimozGodec:file-import
Jun 4, 2021
Merged

Import documents - prevent double quoting#661
VesnaT merged 2 commits intobiolab:masterfrom
PrimozGodec:file-import

Conversation

@PrimozGodec
Copy link
Collaborator

@PrimozGodec PrimozGodec commented May 21, 2021

Issue

Since now Orange's UrlReader encodes special characters in URL biolab/orange3#5412, special characters are getting encoded two times in import document which makes escape characters encoded and so it produces the wrong URL.

Because of changes also self.path is quoted and so matching with metadata fails.

Description of changes
  • Since it is still required to keep encoding in import documents' reader to support older versions of Orange, I propose to decode and encode URLs again. If URL is not encoded, decode does not change the URL.
  • Fix matching with metadata with storing non-encoded path
Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec requested a review from VesnaT May 21, 2021 07:53
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2021

Codecov Report

Merging #661 (8207f30) into master (0feb2e9) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 8207f30 differs from pull request most recent head f49d85d. Consider uploading reports for the commit f49d85d to get more accurate results

@@           Coverage Diff           @@
##           master     #661   +/-   ##
=======================================
  Coverage   73.99%   73.99%           
=======================================
  Files          71       71           
  Lines        9153     9153           
  Branches     1236     1236           
=======================================
  Hits         6773     6773           
  Misses       2144     2144           
  Partials      236      236           

@PrimozGodec
Copy link
Collaborator Author

I added tests with is raised when a minimal version of orange will be set to 3.29.1

@VesnaT VesnaT merged commit f0fadfc into biolab:master Jun 4, 2021
@PrimozGodec PrimozGodec deleted the file-import branch March 29, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants