mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-16 03:06:27 +00:00
Refactor to more readable
This commit is contained in:
@@ -34,10 +34,9 @@ function encodeHTMLEntities (text) {
|
|||||||
['?', '#63']
|
['?', '#63']
|
||||||
]
|
]
|
||||||
|
|
||||||
for (let i = 0; i < entities.length; ++i) {
|
entities.forEach((entity) => {
|
||||||
text = text.replace(entities[i][0], `&${entities[i][1]};`)
|
text = text.replace(entity[0], `&${entity[1]};`)
|
||||||
}
|
})
|
||||||
|
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user