Skip to content

--embed-resources produced invalid HTML if the script tag doesn't have src="" or code #10862

@arp242

Description

@arp242

For example:

% cat b.md
**Hello**
<script></script>

% ./pandoc b.md
<p><strong>Hello</strong></p>
<script></script>

% ./pandoc --embed-resources b.md
<p><strong>Hello</strong></p>
<script>

It's missing the closing </script>. Putting some code inside the <script> tag fixes it, but it's perfectly valid to have an empty script (I came across this trying to find a workaround for #10861).

% pandoc --version
pandoc 3.7.0.1
Features: +server +lua
Scripting engine: Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions