This commit is contained in:
Dragon Fire
2020-10-24 14:25:32 -04:00
parent 40080cadef
commit ebd26a7b0e
25 changed files with 42 additions and 44 deletions
+2 -2
View File
@@ -156,7 +156,7 @@ module.exports = class Util {
}
static embedURL(title, url, display) {
return `[${title}](${url.replace(/\)/g, '%27')}${display ? ` "${display}"` : ''})`;
return `[${title}](${url.replaceAll(')', '%29')}${display ? ` "${display}"` : ''})`;
}
static stripInvites(str, { guild = true, bot = true, text = '[redacted invite]' } = {}) {
@@ -209,7 +209,7 @@ module.exports = class Util {
if (removeLineBreaks) clean = clean.replace(/\r|\n|\f/g, '');
clean = entities.decode(clean);
clean = clean
.replace(/<br/g, '\n')
.replaceAll('<br>', '\n')
.replace(/<\/?i>/g, '*')
.replace(/<\/?b>/g, '**')
.replace(/~!|!~/g, '||');