1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Refactor to more readable

This commit is contained in:
asmsuechan
2017-03-21 23:37:00 -07:00
parent cd2dc471c7
commit 1daf07edeb

View File

@@ -34,10 +34,9 @@ function encodeHTMLEntities (text) {
['?', '#63']
]
for (let i = 0; i < entities.length; ++i) {
text = text.replace(entities[i][0], `&${entities[i][1]};`)
}
entities.forEach((entity) => {
text = text.replace(entity[0], `&${entity[1]};`)
})
return text
}