mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 18:39:41 +02:00
#901 Fixed the issue with multiple calls to bind the click functions. Also sanitized the tooltips so that no tags are allowed in them for (#847).
This commit is contained in:
@@ -430,7 +430,7 @@ const compileTasks = function () {
|
||||
*/
|
||||
export const setLink = function (ids, _linkStr) {
|
||||
let linkStr = _linkStr
|
||||
if (config.securityLevel === 'strict') {
|
||||
if (config.securityLevel !== 'loose') {
|
||||
linkStr = sanitizeUrl(_linkStr)
|
||||
}
|
||||
ids.split(',').forEach(function (id) {
|
||||
@@ -457,7 +457,7 @@ export const setClass = function (ids, className) {
|
||||
}
|
||||
|
||||
const setClickFun = function (id, functionName, functionArgs) {
|
||||
if (config.securityLevel === 'strict') {
|
||||
if (config.securityLevel !== 'loose') {
|
||||
return
|
||||
}
|
||||
if (typeof functionName === 'undefined') {
|
||||
|
Reference in New Issue
Block a user