forgot about leagues, whoops

This commit is contained in:
Elijah Steres 2021-01-06 15:20:46 -05:00
parent eb2c5797cb
commit c931733ad1

View File

@ -88,11 +88,20 @@ const insertGame = (gridboxnum, game) => {
const insertLeague = (league) => {
var btn = document.createElement("BUTTON");
btn.className = "filter";
btn.innerHTML = league;
btn.innerHTML = escapeHtml(league);
$('#filters').append(btn);
return btn;
}
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
const clearBox = (box) => {
box.className = "emptyslot";
box.timestamp = null;