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

Prohibit relative links in HTML document (except for "additional elements" and for "external code snippets") #279

Open
thomasheritage opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@thomasheritage
Copy link
Collaborator

Context

If an author includes something like the following in the HTML document they are writing:

<a href="../registers/">registers directory</a>

then this will appear as a relative link in the HTML rendering.

This works on the author's machine because it links to other resources in the same repo as the HTML document.

This will only work in the HTML rendering on https://doc.smpte-doc.org/ if the referenced item has been included in what's automatically copied to the S3 bucket.

Such links are converted to absolute links in the generated PDF file. For example:

file:///home/runner/work/st2067-206-private/st2067-206-private/build/registers/

which is clearly not helpful.

Proposal

Inclusion of relative links in the HTML document is a validation error except that:

  • they can be used in the "Additional elements" Clause (presumably additional elements files must not be linked to directly from elsewhere in the document though)
  • they can be used for "external code snippets"
  • they can be used for images
  • of course fragment-only links are allowed...

Would that make sense?

@palemieux palemieux added the bug Something isn't working label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants