1HTML::Escape(3) User Contributed Perl Documentation HTML::Escape(3)
2
3
4
6 HTML::Escape - Extremely fast HTML escaping
7
9 use HTML::Escape qw/escape_html/;
10
11 my $escaped = escape_html("<^o^>");
12
14 This modules provides a function which escapes HTML's special
15 characters. It performs a similar function to PHP's htmlspecialchars.
16 It escapes the following characters:
17
18 " & ' < > ` { }
19
20 This module uses XS for better performance, but it also provides a pure
21 perl version.
22
24 Is there also an unescape_html?
25 No. Unescaping HTML requires a lot of code, and we don't want to do
26 it. Please use HTML::Entities for it.
27
29 Rate HTML::Entities HTML::Escape
30 HTML::Entities 14.0/s -- -91%
31 HTML::Escape 150/s 975% --
32
34 Goro Fuji
35
36 Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>
37
39 Text::Xslate, HTML::Entities
40
42 Copyright (C) Tokuhiro Matsuno
43
44 This library is free software; you can redistribute it and/or modify it
45 under the same terms as Perl itself.
46
47
48
49perl v5.34.0 2022-01-21 HTML::Escape(3)