File tree
Expand file treeCollapse file tree1 file changed
+2
-1
lines changed arduino-ide-extension/src/browser/theia/messages
Expand file treeCollapse file tree1 file changed
+2
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -2,6 +2,7 @@ import React from '@theia/core/shared/react';
|
2 | 2 | import { NotificationComponent as TheiaNotificationComponent } from '@theia/messages/lib/browser/notification-component';
|
3 | 3 | import { nls } from '@theia/core/lib/common';
|
4 | 4 | import { codicon } from '@theia/core/lib/browser';
|
| 5 | +import { sanitize } from 'dompurify'; |
5 | 6 |
|
6 | 7 | export class NotificationComponent extends TheiaNotificationComponent {
|
7 | 8 | override render(): React.ReactNode {
|
@@ -20,7 +21,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
|
20 | 21 | />
|
21 | 22 | <div className="theia-notification-message">
|
22 | 23 | <span
|
23 |
| -dangerouslySetInnerHTML={{ __html: message }} |
| 24 | +dangerouslySetInnerHTML={{ __html: sanitize(message) }} |
24 | 25 | onClick={this.onMessageClick}
|
25 | 26 | />
|
26 | 27 | </div>
|
|
You can’t perform that action at this time.
0 commit comments