fix(app.js): fix regex string to not replace instances of 'username'

This commit is contained in:
Rim 2025-03-29 00:49:33 -04:00
parent 7f42c2d369
commit 08349220c2

2
app.js
View File

@ -71,7 +71,7 @@ const sanitizeJsonOutput = (data) => {
const jsonString = JSON.stringify(data);
// Define regex pattern that matches HTML entities
const regexPattern = /<span class=".*?">|<\/span>|">|mp-stat-items|kills-value|headshots-value|username|game-mode|kdr-value|accuracy-value|defends-value/g;
const regexPattern = /<span class=".*?">|<\/span>|">/g;
// Replace unwanted patterns
const sanitizedString = jsonString.replace(regexPattern, '');