forked from Supositware/Haha-Yes
Sanitize user input
This commit is contained in:
parent
838b5efd65
commit
91ea715fe7
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ class dectalkCommand extends Command {
|
|||
async exec(message, args) {
|
||||
args.decMessage = rand.random(args.decMessage, message);
|
||||
args.decMessage = args.decMessage.replace('\n', ' ');
|
||||
let decMessage = '[:phoneme on] ' + args.decMessage;
|
||||
let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1');
|
||||
|
||||
if (process.platform == 'win32') {
|
||||
exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`)
|
|
@ -29,7 +29,7 @@ class dectalkvcCommand extends Command {
|
|||
async exec(message, args) {
|
||||
args.decMessage = rand.random(args.decMessage, message);
|
||||
args.decMessage = args.decMessage.replace('\n', ' ');
|
||||
let decMessage = '[:phoneme on] ' + args.decMessage;
|
||||
let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["\s'$`\\])/g,'\\$1');
|
||||
|
||||
if (process.platform == 'win32') {
|
||||
exec(`cd .\\dectalk && .\\say.exe -w dectalkvc.wav "${decMessage}"`)
|
Loading…
Reference in a new issue