Uri-/html- en-/decoding

web::htmlify

web::htmlify ?-options? text

Options: -numeric.

Returns HTML-compliant text with HTML encoded entities in mnemonic form (e.g. &auml;) or in numeric form (e.g. &#228;) if the option -numeric is specified. Multibyte characters are encoded as &#<numeric>;.

web::dehtmlify

web::dehtmlify text

Removes all HTML-tags from text and translates all HTML entities to their corresponding characters (also handles encoded multibyte characters encoded with &#<numeric>;).

web::uriencode

web::uriencode text

Returns URI-compliant text.

web::uridecode

web::uridecode text

Decodes URI-compliant text.

Example 16. web::htmlify

% web::htmlify <
&lt;
% web::htmlify -numeric <
&#60;
% web::dehtmlify "&lt; &#60;"
< <
% web::uriencode "Hello, world!"
Hello%2c+world%21
% web::uridecode "Hello%2c+world%21"
Hello, world!
%