Problem: xlink values are not url decoded when metsrw reads #206
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
Expected behaviour
I expect that when I read and parse a METS XML file using metsrw that the
FSEntry
instances will havepath
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 thexlink: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()
. EachFSEntry
instance will have apath
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:
The text was updated successfully, but these errors were encountered: