mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 12:29:42 +02:00
Preventing xss manipulation using onerror with the antiscript setting.
This commit is contained in:
@@ -27,8 +27,9 @@ export const removeScript = txt => {
|
||||
}
|
||||
}
|
||||
|
||||
rs = rs.replace('javascript:', '#');
|
||||
rs = rs.replace('<iframe', '');
|
||||
rs = rs.replace(/javascript:/g, '#');
|
||||
rs = rs.replace(/onerror=/g, 'onerror:');
|
||||
rs = rs.replace(/<iframe/g, '');
|
||||
|
||||
return rs;
|
||||
};
|
||||
|
Reference in New Issue
Block a user