mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
Retain attribute dominant-baseline in DOMpurify sanitization
This commit is contained in:
@@ -545,7 +545,10 @@ const render = function (id, _txt, cb, container) {
|
||||
</iframe>`;
|
||||
} else {
|
||||
if (cnf.securityLevel !== 'loose') {
|
||||
svgCode = DOMPurify.sanitize(svgCode, { ADD_TAGS: ['foreignobject'] });
|
||||
svgCode = DOMPurify.sanitize(svgCode, {
|
||||
ADD_TAGS: ['foreignobject'],
|
||||
ADD_ATTR: ['dominant-baseline'],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user