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

Include directives with target containing spaces not working with -S secure #4461

Closed
dometto opened this issue May 24, 2023 · 1 comment
Closed
Assignees
Labels
bug v2.0.21 Issues resolved in the 2.0.21 release
Milestone

Comments

@dometto
Copy link

dometto commented May 24, 2023

The following syntax:

include::foo bar.adoc[]
  • works as intended with -S unsafe
  • outputs the following with -S secure: link:foo bar.adoc[role=include]

It looks like:

  1. it's converting the include directive to a link directive because of secure mode (intended)
  2. but this link directive is not being rendered because of the space

Since it's intended functionality that asciidoctor supports include directives with targets including spaces, this seems like a bug to me. If targets including spaces are supported, and include directives with -S secure are too, shouldn't include targets with a space in secure mode also be fully supported?

I think the intuitive behavior would be for the link in secure mode to be rendered as follows: <a href="foo%20bar.adoc" class="bare include">foo bar.adoc</a>

@mojavelinux mojavelinux self-assigned this May 31, 2023
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue May 31, 2023
…cter reference when generating link from include directive
@mojavelinux mojavelinux added this to the v2.0.x milestone May 31, 2023
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Jun 5, 2023
…e directive in inline passthrough when it contains spaces
@mojavelinux mojavelinux added the v2.0.21 Issues resolved in the 2.0.21 release label Jun 5, 2023
mojavelinux added a commit that referenced this issue Jun 5, 2023
@bartkamphorst
Copy link

Thanks for the fix @mojavelinux !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v2.0.21 Issues resolved in the 2.0.21 release
Projects
None yet
Development

No branches or pull requests

3 participants