Skip to content

Rendering of & characters in ToC #4908

@Paulchen5

Description

@Paulchen5

Describe the bug

When using the [[toc]] feature the & is replaced by &. But this prevents the right formatting of other HTML character entities like &npsp; etc.

Reproduction

[[toc]]

## Example Headeing with HTML character entity → in it

Expected behavior

Rendering the → as an arrow instead of → (in html →)

System Info

System:
    OS: macOS 15.6
    CPU: (x) arm64 Apple M2
    Memory: 0 MB / X.xx GB
    Shell: x.x - /bin/zsh
  Binaries:
    Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.16.0/bin/yarn
    npm: 11.4.2 - ~/.nvm/versions/node/v22.16.0/bin/npm
    pnpm: 10.14.0 - ~/.nvm/versions/node/v22.16.0/bin/pnpm
  Browsers:

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildRelated to the build system

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions