mermaid-js / mermaid-live-editor

Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
https://mermaid.live
MIT License
4.13k stars 626 forks source link

Character entities such as   in sequence diagrams trigger diagram syntax error #1493

Open billfrost opened 2 months ago

billfrost commented 2 months ago

Describe the bug Live editor shows diagram syntax error when the diagram body contains character entities like     The entities are correctly interpreted inside a web page

 element when loading Mermaid from the CDN.

To Reproduce Link to Live Editor: https://mermaid.live/edit#pako:eNo1jTEKwzAMRa9iNHRKLuBCpvYEXbXItpIaYjm15SGE3L2GNtv78D7vAJ8Dg4XKn8bi-RFpKZRQaBynyVlDRrO5iavb3cEAiUuiGPrjQDEGQd-cGMF2DDxTWxUB5exq2wIpP0PUXMBqaTwANc2vXfy1f84_CnamtfL5BZdIMv8

Steps to reproduce the behavior:

  1. Paste the following into a new live editor panel: sequenceDiagram a-->>b: a to  b

Expected behavior Character entities should not trigger syntax errors when the Mermaid code from the CDN honours them correctly.