Hello!
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?
Cheers,
Louis