-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
>
and <
are not being escaped properly when "flowchart": {"htmlLabels": false}
is used
#4390
Comments
Would a solution be to use the newest image? We do not provide bugfixes for the old releases. 😄 |
This is a problem on latest tag. I was giving an older, known working, tag as an aid to debugging this problem. |
Ok. Thanks for clarification 🙂 |
I've tried to recently test this, since I thought a recent commit (mermaid-js/mermaid-cli@ec8559c) might have fixed this issue, but I can't seem to replicate this issue. I put the above diagram into a file called
|
@aloisklink sorry it's still broken and sorry this command line isn't really a minimal necessary to cause the problem, but it's what I have been running from a pipeline from another tool: docker run \
--privileged \
-v /tmp/mermaid.mer:/mermaid.mer \
-v /tmp/mermaid.mer.svg:/tmp/mermaid.mer.svg \
-v /tmp/config.json:/config.json \
-v /tmp:/app/.cache/yarn \
-it \
docker.io/minlag/mermaid-cli:latest \
-c /config.json -i /mermaid.mer -o /tmp/mermaid.mer.svg where
config.json looks like this: {
"startOnLoad": true,
"maxTextSize": 1000000,
"flowchart": {
"useMaxWidth": false,
"htmlLabels": false
},
"sequence": {
"height": 40,
"actorMargin": 80,
"mirrorActors": false,
"bottomMarginAdj": 1
},
"theme": "default"
} Problem seems to be with something in the |
Thanks for the clarification! It seems like the issue is with the As a temporary measure, you can try setting Example diagram here: Source```mermaid
%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart LR
classDef head fill:#ffbfcf;
classDef installed fill:#34ebba;
subgraph servicemeshoperator
subgraph 1.0 channel
servicemeshoperator.v2.0.7.1-1.0(2.0.7-1)
servicemeshoperator.v2.0.7.1-1.0(2.0.7-1) --> servicemeshoperator.v2.0.8-1.0(2.0.8-0)
servicemeshoperator.v2.0.8-1.0(2.0.8-0) --> servicemeshoperator.v2.1.0-1.0(2.1.0-0)
servicemeshoperator.v2.1.0-1.0(2.1.0-0) --> servicemeshoperator.v2.1.1-1.0(2.1.1-0):::head
servicemeshoperator.v2.0.7.1-1.0(2.0.7-1) o--o | >=1.0.2 <2.0.8-0 | servicemeshoperator.v2.0.8-1.0(2.0.8-0)
servicemeshoperator.v2.0.7.1-1.0(2.0.7-1) o--o | >=1.0.2 <2.1.0-0 | servicemeshoperator.v2.1.0-1.0(2.1.0-0)
servicemeshoperator.v2.0.7.1-1.0(2.0.7-1) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-1.0(2.1.1-0):::head
servicemeshoperator.v2.0.8-1.0(2.0.8-0) o--o | >=1.0.2 <2.1.0-0 | servicemeshoperator.v2.1.0-1.0(2.1.0-0)
servicemeshoperator.v2.0.8-1.0(2.0.8-0) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-1.0(2.1.1-0):::head
servicemeshoperator.v2.1.0-1.0(2.1.0-0) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-1.0(2.1.1-0):::head
end
subgraph stable channel - default
servicemeshoperator.v2.0.7.1-stable(2.0.7-1)
servicemeshoperator.v2.0.7.1-stable(2.0.7-1) --> servicemeshoperator.v2.0.8-stable(2.0.8-0)
servicemeshoperator.v2.0.8-stable(2.0.8-0) --> servicemeshoperator.v2.1.0-stable(2.1.0-0)
servicemeshoperator.v2.1.0-stable(2.1.0-0) --> servicemeshoperator.v2.1.1-stable(2.1.1-0):::head
servicemeshoperator.v2.0.7.1-stable(2.0.7-1) o--o | >=1.0.2 <2.0.8-0 | servicemeshoperator.v2.0.8-stable(2.0.8-0)
servicemeshoperator.v2.0.7.1-stable(2.0.7-1) o--o | >=1.0.2 <2.1.0-0 | servicemeshoperator.v2.1.0-stable(2.1.0-0)
servicemeshoperator.v2.0.7.1-stable(2.0.7-1) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-stable(2.1.1-0):::head
servicemeshoperator.v2.0.8-stable(2.0.8-0) o--o | >=1.0.2 <2.1.0-0 | servicemeshoperator.v2.1.0-stable(2.1.0-0)
servicemeshoperator.v2.0.8-stable(2.0.8-0) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-stable(2.1.1-0):::head
servicemeshoperator.v2.1.0-stable(2.1.0-0) o--o | >=1.0.2 <2.1.1-0 | servicemeshoperator.v2.1.1-stable(2.1.1-0):::head
end
end
``` Output from https://mermaid.live for Mermaid v10.1.0 |
>
and <
are not being escaped properly when "flowchart": {"htmlLabels": false}
is used
Describe the bug
A less-than
"<"
symbol causes bad output when using the"flowchart": {"htmlLabels": false}
mermaid config option.To Reproduce
Steps to reproduce the behavior:
Render this mermaid script:
Output from https://mermaid.live for Mermaid v10.1.0
This renders properly without the
"flowchart": {"htmlLabels": false}
bit. With cli images sinceminlag/mermaid-cli:20210503120233a6e5e8
(most recent checked and found not to have the problem) it renders improperly, using > etc for the characters whenever a<
less-than is included in the line labeling text.Expected behavior
Both
"flowchart": {"htmlLabels": false}
and"flowchart": {"htmlLabels": true}
act similarly.Desktop (please complete the following information):
Additional context
This problem did not exist as of
minlag/mermaid-cli:20210503120233a6e5e8
Edited by @aloisklink to add more information from #4390 (comment)
The text was updated successfully, but these errors were encountered: