thanks madness for pointing out line break still being a problem

This commit is contained in:
jenz
2026-08-08 13:49:52 +02:00
parent 3ef8b037a7
commit e040b38a57
+2 -2
View File
@@ -307,12 +307,12 @@ async function checkNewMessages(channel_selected, admin_chat_bool) {
function sanitizeForRcon(str, maxLength = 200) {
if (typeof str !== 'string') return '';
return str
.replace(/[^\w\s.,!?'\-]/g, '') // keep only safe chars, strip everything else
.replace(/[\r\n]+/g, ' ') // collapse newlines to a space first
.replace(/[^\w .,!?'\-]/g, '') // note: \s replaced with a literal space
.trim()
.slice(0, maxLength);
}
var lastProcessedMessageId_rcon_ze = null;
async function checkNewMessages_rcon_ze() {
try {