HTML::Escape3pm
Extremely fast html escaping
Usage
use HTML::Escape qw/escape_html/;my $escaped = escape_html("<^o^>");
Overview
This modules provides a function which escapes HTML's special characters. It performs a similar function to PHP's htmlspecialchars. It escapes the following characters:
" & ' < > ` { }
This module uses XS for better performance, but it also provides a pure perl version.
Faq
- Is there also an unescape_html?
-
No. Unescaping HTML requires a lot of code, and we don't want to do it. Please use HTML::Entities for it.
Benchmark
Rate HTML::Entities HTML::EscapeHTML::Entities 14.0/s -- -91%HTML::Escape 150/s 975% --
Releases
4 releases since Debian 10 (Buster); the text changed 3 times.