Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(mindmap): correctly render ampersand (&) #6315

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/mermaid/src/diagrams/mindmap/mindmapDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const addNode = (level: number, id: string, descr: string, type: number) => {
id: cnt++,
nodeId: sanitizeText(id, conf),
level,
descr: sanitizeText(descr, conf),
descr: sanitizeText(descr, conf)
.replace(/>/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&'),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also get &quot; replaced?

type,
children: [],
width: conf.mindmap?.maxNodeWidth ?? defaultConfig.mindmap.maxNodeWidth,
Expand Down
Loading