Rand Stats

HTML::EscapeUtils

zef:demanuel

HTML-EscapeUtils

Functionalities to escape and unescape HTML

SYNOPSIS

use HTML::EscapeUtils;

escape("<^o^>"); # => '&lt;^o^&gt;'
unescape("&lt;^o^&gt;"); #=> '<^o^>'
unescape("Foo &#xA9; bar &#x1D306; baz &#x2603; qux"); #=> 'Foo © bar 𝌆 baz ☃ qux'

DESCRIPTION

HTML::Escape provides functions to escape and unescape HTML's special characters. Supports named entities (like for example: ' ') and numeric ones as well (like for example ' ' or '&xA0;')

Functions

escape(Str $raw-str) returns Str

Escapes HTML's special characters in given string.

unescape(Str $raw-str) returns Str

Unescapes HTML's special characters in given string.

COPYRIGHT AND LICENSE

Copyright 2023- demanuel <demanuel+cb@ymail.com>

This library is free software; you can redistribute it and/or modify it under the EU 1.2 public license