diff --git a/packages/mermaid/src/diagrams/class/classDb.ts b/packages/mermaid/src/diagrams/class/classDb.ts
index 878ae102f..0d31f45cd 100644
--- a/packages/mermaid/src/diagrams/class/classDb.ts
+++ b/packages/mermaid/src/diagrams/class/classDb.ts
@@ -574,7 +574,7 @@ export const getData = () => {
cnt++;
const noteNode: Node = {
id: note.id,
- label: note.text.replaceAll('\\n', '
'), // 'rect' shape label sanitizes these newlines so must change to
manually
+ label: note.text,
isGroup: false,
shape: 'rect',
padding: config.class!.padding ?? 6,