@@ -9,7 +9,17 @@ const Wiki = sites => {
9 const authors = new Set()
9 const authors = new Set()
10 const terms = new Set()
10 const terms = new Set()
12+ const cleanEntry = entry => {
13+ const temp = document.createElement('div')
14+ temp.textContent = entry
15+ return temp.innerHTML
12− const storeEntry = (author, url, category, term, entry) => {
18+ const storeEntry = (author, url, category, term, unCleanEntry) => {
19+ const entry = Array.isArray(unCleanEntry)
20+ ? unCleanEntry.map(x => cleanEntry(x))
21+ : cleanEntry(unCleanEntry)
13 if (!(category in entries)) {
23 if (!(category in entries)) {
14 entries[category] = {}
24 entries[category] = {}
15 entries[category][term] = [{ entry, authors: [{ author, url }] }]
25 entries[category][term] = [{ entry, authors: [{ author, url }] }]