From 747326f27704153e910d3245ca18a2033b3a5d4b Mon Sep 17 00:00:00 2001
From: Mia <49593536+mia-pi-git@users.noreply.github.com>
Date: Tue, 1 Oct 2024 09:33:47 -0500
Subject: [PATCH] Fix a few more missed &s
---
server/chat-plugins/responder.ts | 4 ++--
server/chat-plugins/smogtours.ts | 2 +-
server/chat-plugins/thing-of-the-day.ts | 2 +-
server/chat.ts | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/chat-plugins/responder.ts b/server/chat-plugins/responder.ts
index 1996c66b86d4..d23d6bcfa15c 100644
--- a/server/chat-plugins/responder.ts
+++ b/server/chat-plugins/responder.ts
@@ -164,11 +164,11 @@ export class AutoResponder {
}
if (str.length > 300 && !raw) throw new Chat.ErrorMessage("Your given string is too long.");
return args.map(item => {
- const split = item.split('~').map(string => {
+ const split = item.split('&').map(string => {
// allow raw regex for admins and users with @ in Dev
if (raw) return string;
// escape
- return string.replace(/[\\^$.*+?()[\]{}]/g, '\\$~').trim();
+ return string.replace(/[\\^$.*+?()[\]{}]/g, '\\$&').trim();
});
return split.map(term => {
if (term.length > 100 && !raw) {
diff --git a/server/chat-plugins/smogtours.ts b/server/chat-plugins/smogtours.ts
index 6d81bc291493..1ce325984298 100644
--- a/server/chat-plugins/smogtours.ts
+++ b/server/chat-plugins/smogtours.ts
@@ -387,7 +387,7 @@ export const pages: Chat.PageTable = {
.replace(/"/g, '"')
.replace(/>/g, '>')
.replace(/</g, '<')
- .replace(/&/g, '~');
+ .replace(/&/g, '&');
// stuff!
let buf = `${back(categoryID)}${refresh(this.pageid)}
`;
buf += `