Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-latin1 characters used with "sandbox" throws and renders iframe in weird spot #4050

Open
hojberg opened this issue Feb 1, 2023 · 0 comments · May be fixed by #5520
Open

non-latin1 characters used with "sandbox" throws and renders iframe in weird spot #4050

hojberg opened this issue Feb 1, 2023 · 0 comments · May be fixed by #5520
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@hojberg
Copy link

hojberg commented Feb 1, 2023

Description

When using the "sandbox" setting along side a diagram with non-latin1 characters in them the following occurs:

  1. An error is thrown:
Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
  1. Instead of not rendering anything, Mermaid, unexpectedly, renders the iframe with the svg (and rendered correctly it seems), at the bottom of the page just before the </body> tag.

Here's the example diagram, notice the (compose) character:

flowchart TB
  A["f ∘ g"]

Steps to reproduce

Here's a full example: https://jsfiddle.net/s3817cjq/8/

Screenshots

No response

Code Sample

No response

Setup

Desktop

  • OS and Version: Mac
  • Browser and Version: Chrome

Additional Context

No response

@hojberg hojberg added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Feb 1, 2023
@jgreywolf jgreywolf added roadmap items to add to roadmap for auto workflow and removed roadmap items to add to roadmap for auto workflow labels Nov 16, 2023
@iansan5653 iansan5653 linked a pull request May 14, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants