uce/site/doc/pages/html_escape.txt

18 lines
447 B
Plaintext

:sig
String html_escape(String s)
:params
s : string to be escaped
return value : an HTML-safe escaped version of 's'
:desc
Returns a version of the input string where the following characters have been replace by HTML entities:
- & → &amp
- < → lt;
- > → &gt;
- " → &quot;
:related
**PHP:** `htmlspecialchars()` or `htmlentities()`
**JavaScript / Node.js:** Safe text insertion via `textContent` or server-side HTML escaping libraries