Skip to content

The html library

github-actions[bot] edited this page Jul 14, 2026 · 3 revisions

Overview

The html library provides functions for escaping and unescaping HTML text.

Functions

escapeString(s string) -> string

escapeString escapes special characters like '<' to become "<". It escapes only five such characters: <, >, &, ' and ". unescapeString(escapeString(s)) == s always holds, but the converse isn't always true.

unescapeString(s string) -> string

unescapeString unescapes entities like "<" to become '<'. It unescapes a larger range of entities than escapeString escapes. For example, "á" unescapes to 'á', as does "á" and "á". unescapeString(escapeString(s)) == s always holds, but the converse isn't always true.


This page is automatically generated from the Pipefish standard library. Any edits made directly to this wiki page will be overwritten the next time the documentation is regenerated.

🧿 Pipefish

Clone this wiki locally