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

v11: some complex HTML content is rendered as an empty node in flowcharts with Firefox #5851

Closed
djibe opened this issue Sep 9, 2024 · 7 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@djibe
Copy link

djibe commented Sep 9, 2024

Description

Complex labels with HTML are rendered as empty nodes in flowcharts since v11 in Firefox (v130 tested) even though "flowchart.htmlLabels" is true.

I couldn't find any doc for migrating from v10 to v11 to solve this.

Steps to reproduce

Diagram link

  1. Run the previous diagram with 10.x
  2. Run the previous diagram with 11.x

Screenshots

v10
Capture d'écran 2024-09-09 220051

v11: bottom node with HTML is rendered as empty node
Capture d'écran 2024-09-09 220037

Code Sample

Link

Setup

  • Mermaid version: 11.x
  • Browser and Version: Firefox 130

Suggested Solutions

  • HTML labels are interpreted the same

Additional Context

No response

@djibe djibe added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 9, 2024
@djibe djibe changed the title v11: HTML content is not rendered in flowcharts v11: some complex HTML content is rendered as an empty node in flowcharts Sep 9, 2024
@codekrolik2
Copy link

+1

mermaid
flowchart
    BEGIN([BEGIN])
    END([END])
    LOAD_CAMERAS_FROM_CONFIG[[LOAD_CAMERAS_FROM_CONFIG]]
    BEGIN([BEGIN]) --> LOAD_CAMERAS_FROM_CONFIG[[LOAD_CAMERAS_FROM_CONFIG]]
    LOAD_CAMERAS_FROM_CONFIG --> RUN_CHILD_FLOWS[[RUN_CHILD_FLOWS]]
    FINALIZE[[FINALIZE]]
    FINALIZE --> END([END])
    RUN_CHILD_FLOWS[[RUN_CHILD_FLOWS]]
    RUN_CHILD_FLOWS --> FINALIZE[[FINALIZE]]
    RUN_CHILD_FLOWS .-> Factory:CameraProcessRunnerFlow>Factory:CameraProcessRunnerFlow]
    RUN_CHILD_FLOWS .-> Factory:VideoChunkManagerFlow>Factory:VideoChunkManagerFlow]

@TTycho
Copy link

TTycho commented Sep 10, 2024

As Markdown Preview Enhanced recently updated Mermaid from 10.9.0 to 11.1.1 I noticed a similar issue. Since this update I get the text "Unsupported markdown: link" in the preview window in Mermaid nodes that contain a string starting with 'www.' or an email address. In the HTML exported version nothing appears in these blocks.

Environment

  • OS: Linux
  • VSCode: 1.92.2
  • Markdown Preview Enhanced: 0.8.14
  • Mermaid 11.1.1
  • Node.js: 20.14.0

To Reproduce
Not sure what version Github is using but for me the boxes below A and B are empty:

flowchart
A -->mermaid("www.mermaidjs.org")
B -->me_example_com["[email protected]"]
Loading

Expected behavior

No links created

@pawel-bugalski
Copy link

I can confirm the problem.
Here is a small reproduction I've made:
https://mermaid.live/edit#pako:eNo9j7EOgzAMRH8l8tRKLO2YuWsn1iwuMQQpiSvjqFSIf28KAk_26Z1Pt0DHnsCCy33kTxdQ1GVT58Xz7eKg5UQmsxoNqCZyHozSrA6uJ3Y_MDSvcWdINmo3eaZpeyGUPclphQYSScLR1_zlrznQQIkc2Lp66rHEmuTyWlEsyu03d2BVCjUgXIYAtsc41au8PSo9RhwE04GQH5XluRfceq4_ZHRQQw

Note that this renders perfectly in Chrome 128.0.6613.120 but fails in Firefox 130.0

Firefox:
Screenshot 2024-09-10 at 11 20 17
Chrome:
Screenshot 2024-09-10 at 11 33 19

@djibe djibe changed the title v11: some complex HTML content is rendered as an empty node in flowcharts v11: some complex HTML content is rendered as an empty node in flowcharts with Firefox Sep 10, 2024
@FinnHuelsbusch
Copy link

Tested on firefox 130 and 131 under linux and windows. In all cases the same nodes are empty.
A good example is https://mermaid.js.org/config/math.html as the example is only partially rendered.
image

@theletterf
Copy link

Related: #5824

@FinnHuelsbusch
Copy link

It is worth noting though that #5824 appears both under chrome and firefox, while this bug only appears under firefox

@djibe
Copy link
Author

djibe commented Sep 16, 2024

Solved by #5856 (v11.2.1)

@djibe djibe closed this as completed Sep 16, 2024
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

No branches or pull requests

6 participants