Skip to content

How to prevent the weird escaping of backquotes in HTML cells? #535

@galopin

Description

@galopin

Describe the bug

It seems that backquotes are automatically escaped in HTML cells ⁉️
I don't get the rationale behind this behavior…

To Reproduce

  1. Insert a new HTML cell as follows:

\`\`

<oops>``</oops>
  1. Insert another cell as follows:

``

html`<oops>\`\``
  1. Compare the output…

  2. It gets even worse when querying the text content of the above nodes:

Array(2) [
0: "\\`\\`"
1: "``"
]

Array.from(document.querySelectorAll("oops")).map((elt) => elt.textContent)

Expected behavior

I expect the output to be the same whether I use a JavaScript or HTML cell, e.g. ``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions