Skip to content

Html Entities inside inline SVG do not render correctly #5144

@blemelin

Description

@blemelin

🐛 Bug Report

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

Html entities inside inline svg does not render correctly. They seems to be escaped twice.

Have you read the Contributing Guidelines on issues?

Yes

Steps to reproduce

Here are the steps to reproduce the issue.

  1. Create a SVG with special characters like < or >.
  2. Add it to any doc by inlining it (see this)

Expected behavior

image

Actual behavior

image

For your information, I can use the <img> tag and it works just fine, but I need the text to be selectable (yeah...that's a weird requirement...I know....).

Your environment

  • Windows 10 Build 19042.1083
  • Firefox 89.2.2
  • NodeJs 7.3.0

Reproducible demo

Live Demo : [Deleted]
Repo : [Deleted]
intro.md file : [Deleted]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionexternalThis issue is caused by an external dependency and not Docusaurus.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions