mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 23:39:50 +02:00
#847 fix for case texts with multiple br tags, explanation in usage doc on how to avoid labels out of bounds.
This commit is contained in:
@@ -20,7 +20,7 @@ const sanitize = text => {
|
||||
let txt = text
|
||||
if (config.securityLevel === 'strict') {
|
||||
txt = txt.replace(/<br>/g, '#br#')
|
||||
txt = txt.replace(/<br\S*\/>/g, '#br#')
|
||||
txt = txt.replace(/<br\S*?\/>/g, '#br#')
|
||||
txt = txt.replace(/</g, '<').replace(/>/g, '>')
|
||||
txt = txt.replace(/#br#/g, '<br/>')
|
||||
}
|
||||
|
Reference in New Issue
Block a user