# html/decode-entities
Decode HTML5 character references in a plain string — the full named
set (`&`, `©`, `—`, …) plus decimal and hex numeric
references (`A`, `😀`) — without parsing anything as markup.
## Syntax
[html/decode-entities $s]
## Parameters
- `$s` — text containing character references (string)
## Examples
[html/decode-entities "a & b © A B"] # => "a & b © A B" [html/decode-entities "Mac & Cheese — 12""] # => "Mac & Cheese — 12\"" # A literal "<" stays text — tags are not parsed [html/decode-entities "<b>bold</b>"] # => "<b>bold</b>"
## Returns
The decoded string. Unknown references are left exactly as written
(`&bogus;` passes through), and whitespace is preserved verbatim — no
collapsing, no trimming.
For entity decoding inside a document, use `html/parse` / `html/text`
instead: the parser already decodes references in text and attributes.
## See Also
`html/parse`, `html/text`, `xml/unescape`