diff options
author | Marvin Borner | 2021-01-29 14:10:45 +0100 |
---|---|---|
committer | Marvin Borner | 2021-01-29 14:10:45 +0100 |
commit | aec1e8f2cd4c0fdedd200fc30094587c0834d372 (patch) | |
tree | 407946fbe687b252d4133067aa770e0ee24851b1 /profile/public/user.js | |
parent | 2eff2deb98280aa61241e06163c87155911bbfae (diff) | |
parent | 8637186a9f835972a5a0b96e4df1665d6d42557a (diff) |
Merge branch 'crop'
Diffstat (limited to 'profile/public/user.js')
-rw-r--r-- | profile/public/user.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/profile/public/user.js b/profile/public/user.js index 39d6713..963904c 100644 --- a/profile/public/user.js +++ b/profile/public/user.js @@ -10,10 +10,12 @@ function addUser(userData) { const questions = userData.questions; const user = userData.user; for (const questionID in questions) { - if (!questions.hasOwnProperty(questionID)) continue; + if (!questions.hasOwnProperty(questionID) || questions[questionID].type === "file") continue; const question = questions[questionID]; const div = document.createElement("div"); - div.innerHTML = `<b>${question.question}</b> <span>${question.answer || ""}</span>`; + div.innerHTML = `<b>${question.question.replace(/</g, "<").replace(/>/g, ">")}</b> <span>${ + (question.answer || "nichts").replace(/</g, "<").replace(/>/g, ">") || "" + }</span>`; divs.push(div); } const h1 = document.createElement("h1"); |