From 4c0c009190c0dc89749994ab2ba2e7896076e1fb Mon Sep 17 00:00:00 2001 From: RedGuy12 <61329810+RedGuy12@users.noreply.github.com> Date: Sun, 30 Oct 2022 16:29:32 -0500 Subject: [PATCH] fix(escapeMarkdown): fix double escaping (v13) Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com> --- src/util/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Util.js b/src/util/Util.js index 658864fff163..e830e3150ecd 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -199,6 +199,7 @@ class Util extends null { }) .join(inlineCode ? '\\`' : '`'); } + if (escape) text = Util.escapeEscape(text); if (inlineCode) text = Util.escapeInlineCode(text); if (codeBlock) text = Util.escapeCodeBlock(text); if (italic) text = Util.escapeItalic(text); @@ -206,7 +207,6 @@ class Util extends null { if (underline) text = Util.escapeUnderline(text); if (strikethrough) text = Util.escapeStrikethrough(text); if (spoiler) text = Util.escapeSpoiler(text); - if (escape) text = Util.escapeEscape(text); if (heading) text = Util.escapeHeading(text); if (bulletedList) text = Util.escapeBulletedList(text); if (numberedList) text = Util.escapeNumberedList(text);