WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 46f1d7c

Browse files
authored
Escape asterisks in error message content for notification display (#2811)
* Escape asterisks in error message content for notification display * Add a condition to handle only verification errors * Match coding style
1 parent 1fa0fd3 commit 46f1d7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arduino-ide-extension/src/browser/contributions/contribution.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ export abstract class CoreServiceContribution extends SketchContribution {
264264
let message: undefined | string = undefined;
265265
if (CoreError.is(error)) {
266266
message = error.message;
267+
if (error.code === CoreError.Codes.Verify) {
268+
message = message.replace(/[*]/g, '\\*');
269+
}
267270
} else if (error instanceof Error) {
268271
message = error.message;
269272
} else if (typeof error === 'string') {

0 commit comments

Comments
 (0)