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

Replace HTML in XML #5144

Open
bendqh1 opened this issue Dec 13, 2023 · 0 comments
Open

Replace HTML in XML #5144

bendqh1 opened this issue Dec 13, 2023 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@bendqh1
Copy link

bendqh1 commented Dec 13, 2023

Description

I have exported my chart in mermaid.live to SVG and tried to upload it to a MediaWiki website but failed with the error that the file has an "illegal namespace".
I have consulted a MediaWiki developer about this and he told me that the reason is because this SVG contains HTML and MediaWiki does not allow SVG that contains HTML.

I have also exported a PNG but given that the chart is very large, when zomming in to the PNG it looks to me pixelated or smeared.

Steps to reproduce

Run this chart in mermaid.live and then try to export it to SVG and upload it to a website built with MediaWiki or try to export it to a PNG and zoom in.

flowchart TD
    1[a]
    1 --> 2[b]
    2 --> A1[c] 
    2 --> A2[d]
    2 --> A3[h]
    2 --> A4[i]
    A2 --> A[j]
    A1 & A2 --> 5[k]
    5 & A4 --> A5[l]
    5 --> 6[m]
    6 --> 7[n] & 8[o]
    8 --> 9[p]
    X[q] --> 11
    7 --> 10[r] & 11[s] & 12[t] & 14[u]
    XX[v]
    12 & XX --> B[w]
    11 & 12 & 9 --> 13[x]
    11 & XX --> 15[y]
    10 & 15 --> 16[z]
    13 --> 17[aa]
    17 --> 18[bb] & 19[cc] & 20[dd] & 21[ee]
    15 & 18 & 21 --> C1[ff]
    C1 --> C2[gg]
    C2 & 16 --> C2_1[hh]
    XXX[ii] & C2 --> C3[jj]
    C3 --> C4[kk]
    C4 --> C2_1
    C4 ---> C5[ll] & C6[mm]
    A4 & 16 & C3 --> XXXX[nn]
    B & XX & XXXX & 16 & C4 --> I1[oo]
    I1 --> I2[pp] & I3[qq]
    I2 --> I2_2[rr]
    I2 --> I2_1[ss]
    I2_2 --> I3 & I5
    I3 --> I4[tt] --> I5[uu]
    I3 --> I6[vv] --> I7[ww]
    17 & C1 & C5 & C6 --> C7[xx]
    15 --> ZZ[yy] & I2 --> I8
    I2 & I6 --> I8[zz]
    I2 --> I9[aaa]
    I7 --> E[bbb]
    17 & C5 & C7 --> C8[ccc]
    C7 --> C9[ddd]
    C8 & 19 --> R1[eee]

Screenshots

Pixelated or smeared PNG:

1
2

SVG output example

flowchart TD
    1[a]
    1 --> 2[b]
    2 --> A1[c] 
    2 --> A2[d]
    2 --> A3[h]
    2 --> A4[i]
    A2 --> A[j]
    A1 & A2 --> 5[k]
    5 & A4 --> A5[l]
    5 --> 6[m]
    6 --> 7[n] & 8[o]
    8 --> 9[p]
    X[q] --> 11
    7 --> 10[r] & 11[s] & 12[t] & 14[u]
    XX[v]
    12 & XX --> B[w]
    11 & 12 & 9 --> 13[x]
    11 & XX --> 15[y]
    10 & 15 --> 16[z]
    13 --> 17[aa]
    17 --> 18[bb] & 19[cc] & 20[dd] & 21[ee]
    15 & 18 & 21 --> C1[ff]
    C1 --> C2[gg]
    C2 & 16 --> C2_1[hh]
    XXX[ii] & C2 --> C3[jj]
    C3 --> C4[kk]
    C4 --> C2_1
    C4 ---> C5[ll] & C6[mm]
    A4 & 16 & C3 --> XXXX[nn]
    B & XX & XXXX & 16 & C4 --> I1[oo]
    I1 --> I2[pp] & I3[qq]
    I2 --> I2_2[rr]
    I2 --> I2_1[ss]
    I2_2 --> I3 & I5
    I3 --> I4[tt] --> I5[uu]
    I3 --> I6[vv] --> I7[ww]
    17 & C1 & C5 & C6 --> C7[xx]
    15 --> ZZ[yy] & I2 --> I8
    I2 & I6 --> I8[zz]
    I2 --> I9[aaa]
    I7 --> E[bbb]
    17 & C5 & C7 --> C8[ccc]
    C7 --> C9[ddd]
    C8 & 19 --> R1[eee]
Loading

Setup

  • Mermaid version: Mermaid live 10.6.1
  • Browser and Version: Microsoft Edge version 120.0.2210.61 (Official build) (64-bit)

Suggested Solutions

No response

Additional Context

No response

@bendqh1 bendqh1 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Dec 13, 2023
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

1 participant