HTML::Entity
Generated from the official list of valid HTML entities and can decode
entity-laden text via &decode-entities
(or &decode
if use … :ALL
is given)
Can also encode basic entities via &encode-entities
/&encode
.
Synopsis
use HTML::Entity;
say encode-entities "This <em>needs</em> to be escaped & encoded!";
# This <em>needs</em> to be escaped & encoded!
say decode-entities "4.99 ≈ 5"; # 4.99 ≈ 5
say HTML::Entity<≂̸> # ≂̸
use HTML::Entity :ALL;
say decode "fjäril"; # fjäril
say encode "A & B < C"; # A & B < C