From 6963c44e600318eb311611f98cee2a08d417c511 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Mon, 2 Mar 2020 10:13:49 -0600 Subject: [PATCH] Properly sanitize text on motivate --- commands/motivate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/motivate.js b/commands/motivate.js index 5848835..86a127d 100644 --- a/commands/motivate.js +++ b/commands/motivate.js @@ -15,12 +15,12 @@ exports.run = async (message, args) => { const size = await gm(buffer).sizePromise(); await gm(buffer).coalesce().background("black").gravity("Center").extent(600, size.height + 50).writePromise(file); const size2 = await gm(file).sizePromise(); - await gm().background("black").out("-size", "600").fill("white").font("Times").pointSize(56).gravity("Center").out(`pango:${topText}`).gravity("South").out("-splice", bottomText ? "0x0" : "0x20").writePromise(text); + await gm().background("black").out("-size", "600").fill("white").font("Times").pointSize(56).gravity("Center").out(`pango:${topText.replace(/&/g, "\\&").replace(/>/g, "\\>").replace(//g, "\\>").replace(/