Port whisper

This commit is contained in:
Essem 2022-03-19 23:25:59 -05:00
parent 1a66bf6077
commit 7486d5c170
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 66 additions and 59 deletions

View file

@ -4,7 +4,7 @@ class WhisperCommand extends ImageCommand {
params(url) {
const newArgs = this.type === "classic" ? this.args.filter(item => !item.includes(url)).join(" ") : this.options.text;
return {
caption: newArgs.replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%")
caption: newArgs.replaceAll("&", "&amp;").replaceAll(">", "&gt;").replaceAll("<", "&lt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;").replaceAll("\\n", "\n")
};
}