Remove HTML sanitizer

This commit is contained in:
James Lyne 2021-01-06 00:59:27 +00:00
parent a2942b6400
commit 4cc1f8fd1f
2 changed files with 5 additions and 9 deletions

View File

@ -12,7 +12,6 @@
"vue": "^3.0.0"
},
"devDependencies": {
"@esri/arcgis-html-sanitizer": "^2.5.0",
"@types/clipboard": "^2.0.1",
"@types/leaflet": "^1.5.19",
"@typescript-eslint/eslint-plugin": "^4.1.0",

View File

@ -34,11 +34,8 @@ import {
DynmapWorld,
DynmapWorldMap
} from "@/dynmap";
import {Sanitizer} from "@esri/arcgis-html-sanitizer";
import {useStore} from "@/store";
const sanitizer = new Sanitizer();
function buildServerConfig(response: any): DynmapServerConfig {
return {
version: response.dynmapversion || '',
@ -460,8 +457,8 @@ function buildUpdates(data: Array<any>): DynmapUpdates {
updates.chat.push({
type: 'chat',
playerAccount: entry.account,
playerName: entry.playerName ? sanitizer.sanitize(entry.playerName) : "",
message: entry.message ? sanitizer.sanitize(entry.message) : "",
playerName: entry.playerName || "",
message: entry.message || "",
timestamp: entry.timestamp,
channel: entry.channel || undefined,
});
@ -481,7 +478,7 @@ function buildUpdates(data: Array<any>): DynmapUpdates {
updates.chat.push({
type: 'playerjoin',
playerAccount: entry.account,
playerName: entry.playerName ? sanitizer.sanitize(entry.playerName) : "",
playerName: entry.playerName || "",
timestamp: entry.timestamp || undefined,
});
break;
@ -500,7 +497,7 @@ function buildUpdates(data: Array<any>): DynmapUpdates {
updates.chat.push({
type: 'playerleave',
playerAccount: entry.account,
playerName: entry.playerName ? sanitizer.sanitize(entry.playerName) : "",
playerName: entry.playerName || "",
timestamp: entry.timestamp || undefined,
});
break;
@ -578,7 +575,7 @@ export default {
account: player.account || "",
health: player.health || 0,
armor: player.armor || 0,
name: player.name ? sanitizer.sanitize(player.name) : "",
name: player.name || "",
sort: player.sort || 0,
hidden: !world,
location: {