Skip to content

Html Entities inside inline SVG do not render correctly #5144

Closed

Description

@blemelin

🐛 Bug Report

Prerequisites

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]

Activity

  1. added
    bug
    status: needs triage
    on Jul 11, 2021
  2. lex111 commented on Jul 12, 2021

    @lex111
    Contributor

    Fix for this bug here -> gregberge/svgr#553, so we will wait for merge that.

  3. Josh-Cena commented on Oct 30, 2021

    @Josh-Cena
    Collaborator

    Should be fixed

  4. lex111 commented on Oct 30, 2021

    @lex111
    Contributor

    Actually, this is not fixed. However, a new major version (in alpha stage) of svgr/webpack has been released which fixes this issue. Therefore, @blemelin you can upgrade your local dependency "@svgr/webpack" to "v6.0.0-alpha.0" to resolve the bug. We on our part, will wait for more stable version.

  5. Josh-Cena commented on Oct 30, 2021

    @Josh-Cena
    Collaborator

    In that case let's reopen & wait for the version bump on our side🤷‍♂️

  6. lex111 commented on Dec 4, 2021

    @lex111
    Contributor

    Resolved in #5958.

    However since @svgr/webpack dependency is explicitly listed in the package.json when initializing of Docusaurus site, this library must be manually updated to "^6.0.0".

  7. Josh-Cena commented on Dec 4, 2021

    @Josh-Cena
    Collaborator

    However since @svgr/webpack dependency is explicitly listed in the package.json when initializing of Docusaurus site, this library must be manually updated to "^6.0.0".

    I guess it's actually fine, because in our core we prioritize node_modules of the core itself to the site's node_modules so that the deps is always the version required by the core

  8. added
    external
    and removed
    status: needs triage
    on Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugexternal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions