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

SelfContained: unnecessary attributes in included SVG #8965

Closed
nxn-4-wdf opened this issue Jul 25, 2023 · 0 comments
Closed

SelfContained: unnecessary attributes in included SVG #8965

nxn-4-wdf opened this issue Jul 25, 2023 · 0 comments
Labels

Comments

@nxn-4-wdf
Copy link

Explain the problem.

I tested feature request #8948 (embed SVG in HTML 5 instead of data-uri).

The tested SVG starts with:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="781px" height="401px" viewBox="-0.5 -0.5 781 401">

Output HTML file contains:

<svg id="svg_04f4959dcbbe8d34aaf17feb08637c00b4ae9263" alt="Environment overview" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="781px" height="401px" viewBox="-0.5 -0.5 781 401" width="782" height="402">

Issue:

  • Attributes width and height are specified twice. Either keep the original or the generated one.

Optionally:

  • Attributes xmlns, xmlns:xlink and version are unnecessary and can be safely deleted
  • Hash value in SVG id contains 40 characters. This is too long, the first 20 chars are sufficient: even with 1 million SVGs in the document, the "anniversary collision" probability is (estimated) less than 1/10^12

Pandoc version?

Current Pandoc 3.1.6 on Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant