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

Problem: xlink values are not url decoded when metsrw reads #206

Closed
jrwdunham opened this issue Sep 25, 2018 · 0 comments
Closed

Problem: xlink values are not url decoded when metsrw reads #206

jrwdunham opened this issue Sep 25, 2018 · 0 comments
Assignees
Labels
OCUL: AM-Dataverse OCUL: AM-Dataverse Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.
Milestone

Comments

@jrwdunham
Copy link

Expected behaviour

I expect that when I read and parse a METS XML file using metsrw that the FSEntry instances will have path attributes whose values are already URL-decoded for me.

Current behaviour

Resolution of #187 resulted in metsrw URL-encoding the values of xlink:href attributes in the XML that it writes. However, now when fsentry.path is accessed the resulting value (which comes from the xlink:href attribute) us URL-encoded and must be manually URL-decoded. This manual step should be unnecessary. URL encoding/decoding should be transparent to the user.

Steps to reproduce

Use metsrw to create a METS XML file that contains files whose paths contain characters that are not allowed in URLs, such as brackets. Then use metsrw to parse the file you have written, and iterate through the FSEntry instances returned by .all_files(). Each FSEntry instance will have a path attribute whose value is a URL-encoded path.

Your environment (version of Archivematica, OS version, etc)

metsrw==0.2.2


For Artefactual use:
Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

  • All PRs related to this issue are properly linked 👍
  • All PRs related to this issue have been merged 👍
  • Test plan for this issue has been implemented and passed 👍
  • Release documentation (e.g. release notes, wiki documentation, etc) regarding this issue has been written 👍
@jrwdunham jrwdunham self-assigned this Sep 25, 2018
@jrwdunham jrwdunham added OCUL: AM-Dataverse OCUL: AM-Dataverse Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result. labels Sep 25, 2018
@jrwdunham jrwdunham added Status: refining The issue needs additional details to ensure that requirements are clear. Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Status: in progress Issue that is currently being worked on. and removed Status: refining The issue needs additional details to ensure that requirements are clear. Status: ready The issue is sufficiently described/scoped to be picked up by a developer. labels Sep 25, 2018
@sevein sevein added Status: review The issue's code has been merged and is ready for testing/review. and removed Status: in progress Issue that is currently being worked on. labels Sep 26, 2018
@sromkey sromkey added this to the 1.8.0 milestone Sep 26, 2018
@ablwr ablwr self-assigned this Oct 8, 2018
@ablwr ablwr added Status: verified and removed Status: review The issue's code has been merged and is ready for testing/review. labels Oct 9, 2018
@sromkey sromkey closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCUL: AM-Dataverse OCUL: AM-Dataverse Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.
Projects
None yet
Development

No branches or pull requests

4 participants