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

Ensure image URL is properly encoded #40

Closed
Vitaliy-1 opened this issue Dec 9, 2020 · 0 comments
Closed

Ensure image URL is properly encoded #40

Vitaliy-1 opened this issue Dec 9, 2020 · 0 comments

Comments

@Vitaliy-1
Copy link
Owner

Related to: https://forum.pkp.sfu.ca/t/jatsparserplugin-and-oldgregg-after-upgrade-to-3-2-1-2/64498/11

The Texture plugin doesn't escape spaces in the URI of the image in the JATS XML output. To reproduce:

  1. Create new JATS XML file
  2. Open with Texture
  3. Create a new Figure, upload a file with a filename that contains spaces, e.g. fig 1.jpg as per forum thread.
  4. Save the file and explore tags related to a new figure:
<graphic id="graphic-2b9ee4ad70b4c56ec056012bf94bd7fa" mimetype="image" mime-subtype="jpeg" xlink:href="fig 1.jpg"/>

according to the JATS XML specification: https://jats.nlm.nih.gov/publishing/tag-library/1.3d1/attribute/xlink-href.html

As specified in XML Linking Language (XLink) Version 1.0, the value of an @xLink:href must be a valid URI.

if considering encoded one: xlink:href="fig%201.jpg

  • Escape URLs in the HTML output
  • Should/can it be escaped in Texture?
Vitaliy-1 added a commit to Vitaliy-1/JATSParser that referenced this issue Dec 9, 2020
Vitaliy-1 added a commit to Vitaliy-1/JATSParser that referenced this issue Dec 9, 2020
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

1 participant