Closed iansan5653 closed 1 week ago
Name | Link |
---|---|
Latest commit | 51c07163aab3c5469d7baff3b69e7fc5c5075485 |
Latest deploy log | https://app.netlify.com/sites/mermaid-js/deploys/667464815e61a00008912ac5 |
Deploy Preview | https://deploy-preview-5520--mermaid-js.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Attention: Patch coverage is 0%
with 9 lines
in your changes missing coverage. Please review.
Project coverage is 5.73%. Comparing base (
3af4020
) to head (51c0716
).
😕 Not sure why the lint CI is failing now. Something to do with docs?
There were some issues in develop, let's see if it passes now.
The latest updates on your projects. Learn more about Argos notifications ↗︎
Build | Status | Details | Updated (UTC) |
---|---|---|---|
default (Inspect) | ✅ No changes detected | - | Jun 20, 2024, 5:30 PM |
@iansan5653, Thank you for the contribution! You are now eligible for a year of Premium account on MermaidChart. Sign up with your GitHub account to activate.
:bookmark_tabs: Summary
btoa
is the native browser API for encoding strings to Base64, but it does not support UTF-16 code points:This in turn results in Mermaid crashing when attempting to render diagrams with, for example, emojis. Which causes Mermaid to render the diagram directly to the page, circumventing the sandbox mode and breaking the page.
This PR fixes the problem by down-encoding the string to UTF-8 before encoding it to Base64, as described on MDN. In addition, now that the encoded string is UTF-8 we need to specify an encoding in the
data
URL so that the browser knows how to render that text.:clipboard: Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch