mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
Escape quotations
This commit is contained in:
parent
9ab24806f9
commit
11450e17ab
1 changed files with 10 additions and 3 deletions
|
|
@ -71,15 +71,22 @@ export async function showSystemNotification(options: NotificationOptions): Prom
|
|||
throw new Error("Message is required")
|
||||
}
|
||||
|
||||
const escapedOptions = {
|
||||
...options,
|
||||
title: title.replace(/"/g, '\\"'),
|
||||
message: message.replace(/"/g, '\\"'),
|
||||
subtitle: options.subtitle?.replace(/"/g, '\\"') || "",
|
||||
}
|
||||
|
||||
switch (platform()) {
|
||||
case "darwin":
|
||||
await showMacOSNotification({ ...options, title })
|
||||
await showMacOSNotification(escapedOptions)
|
||||
break
|
||||
case "win32":
|
||||
await showWindowsNotification({ ...options, title })
|
||||
await showWindowsNotification(escapedOptions)
|
||||
break
|
||||
case "linux":
|
||||
await showLinuxNotification({ ...options, title })
|
||||
await showLinuxNotification(escapedOptions)
|
||||
break
|
||||
default:
|
||||
throw new Error("Unsupported platform")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue