Skip to content

Image in title: Stray end tag "img" in TOC #11003

Closed
@Salamandar

Description

@Salamandar

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Adding future: { experimental_faster: true} triggers some new warnings on a working website:

## <img src="/img/some_image.png" height="32" /> Some title

Triggers:

[WARNING] Docusaurus static site generation process emitted warnings for 1 paths
This is non-critical and can be disabled with DOCUSAURUS_IGNORE_SSG_WARNINGS=true
Troubleshooting guide: https://github.com/facebook/docusaurus/discussions/10580

- "/administer/tutorials/external_storage":
  - [HTML minifier diagnostic - error] Stray end tag "img" - {"primary_spans":[{"end":66301,"start":66295}],"span_labels":[]}

Indeed I can find some javascript files with value="<img></img> Some title", it seems to be related to the table of contents. Indeed the image is not visible in it and that makes sense.

I can find the same <img></img> without docusaurus faster, so it only reveals a pre-existing issue.

Reproducible demo

No response

Steps to reproduce

Put an img in title

Expected behavior

no warning

Actual behavior

warnings about </img>

Your environment

  • Public source code: https://github.com/yunohost/doc/tree/docusaurus
  • Public site URL: none yet
  • Docusaurus version used: 3.7.0
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node 19
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Archlinux

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions