Merge pull request #135 from esSteres/indev

forgot about leagues, whoops
This commit is contained in:
Sakimori 2021-01-06 15:23:31 -05:00 committed by GitHub
commit 5aa1ae4b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,11 +88,20 @@ const insertGame = (gridboxnum, game) => {
const insertLeague = (league) => { const insertLeague = (league) => {
var btn = document.createElement("BUTTON"); var btn = document.createElement("BUTTON");
btn.className = "filter"; btn.className = "filter";
btn.innerHTML = league; btn.innerHTML = escapeHtml(league);
$('#filters').append(btn); $('#filters').append(btn);
return 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) => { const clearBox = (box) => {
box.className = "emptyslot"; box.className = "emptyslot";
box.timestamp = null; box.timestamp = null;