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

base-uri() produces "Invalid URI: ..." for file with square brackets in name #2180

Closed
jperterm opened this issue Feb 24, 2023 · 2 comments
Closed

Comments

@jperterm
Copy link

jperterm commented Feb 24, 2023

Description of the Problem

When I execute collection('...')/base-uri() on a database which has a file/document named [Content_Types].xml, I get Invalid URI: /some-db/[Content_Types].xml.

[Content_Types].xml files are part of the Open Packaging Conventions, which e.g. is used for packaging OOXML (DOCX files etc.).

Expected Behavior

I expect the URI have escaped square brackets and produce /some-db/%5BContent_Types.xml%5D.xml.

Steps to Reproduce the Behavior

  1. Create a [Content_Types].xml file with valid xml.
  2. Create and open a database some-db with file above.
  3. Run collection('some-db')/base-uri()

Do you have an idea how to solve the issue?

No response

What is your configuration?

  • BaseX v10.4
  • OS: Win 10
@ChristianGruen
Copy link
Member

True, we need to fix this. There's already an open issue for that (#1172), so I'll close yours.

Until this is fixed, you can use helper functions of our Database Module instead(db:name, db:path).

@jperterm
Copy link
Author

Ah, thanks for the hint with the helper functions. I already tried to find something alike.

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

No branches or pull requests

2 participants