You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML escaping and unescaping is slow and incomplete #14
The escaping and unescaping functions use string.replace, but that's unfortunately slow as it'll make a full copy of the entire string for each call to the replace function.
The unescape function is also somewhat incomplete as it only unescapes some HTML entities, the majority of them being left as-is.
Perhaps you could depend on the established libraries for escaping and unescaping HTML in Gleam?
@lpil : I’ve gone ahead and implemented what you suggested, there’s a dedicated branch now. I’ll wait a few days and try it out when I have some time, then merge it.
Honestly, I hadn’t known about either of those libraries before; str was mostly born from a mystical focus of passion and chaos 😅. And yeah… a little bit of that shows in how things were originally wired up.
Activity
lupodevelop commentedon Jan 8, 2026
@lpil : I’ve gone ahead and implemented what you suggested, there’s a dedicated branch now. I’ll wait a few days and try it out when I have some time, then merge it.
Honestly, I hadn’t known about either of those libraries before; str was mostly born from a mystical focus of passion and chaos 😅. And yeah… a little bit of that shows in how things were originally wired up.
Thanks!
lpil commentedon Jan 8, 2026
Sweet!