#6631·mermaid

<br> tags no longer working in tooltips in Chrome

Author: swinadeorCreated Jun 4, 2025Updated Sep 15, 2026
LabelsType: Bug / ErrorStatus: ApprovedGood first issue!

Description

The < br > tag used to work fine in the tooltips with the last versions of Chrome (up to the version 136.0.7103.114)

With the last update in Chrome, the < br > doesn't seem to be properly rendered in HTML as it used to. Currently the
gets displayed as regular text in the tooltip.

Apprently the solution provided 2 years ago (https://github.com/mermaid-js/mermaid/pull/3331) doesn't seem to work anymore in Chrome.

Seems to be working properly on Edge and Firefox though.

Steps to reproduce

  1. Execute the code in the following codesandbox: https://codesandbox.io/p/devbox/wplvg5
  2. Mouse over on a node
  3. The text in the tooltip will be displayed with < br >

Screenshots

< br > properly working with Chrome 136.0.7193.114

< br > stopped working with higher versions of Chrome for example 137.0.7151.68 (current date: 04.06.2025)

Not properly rendered anymore in HTML

Setup

  • Mermaid version: 11.6.0
  • Chrome: any version higher than 136.0.7193.114