Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. EncodeHTML returns string with these conversions made.
The function is useful to prevent user-supplied text from containing HTML markup. It will translate any character outside the printable ASCII character set, and all dangerous characters (<, >, &), into a HTML entitity.
The function resembles EncodeValue, with the exception that it translates linebreaks into <br> tags, as opposed to entities
// returns a link with the proper encoded url and text for the file
// with ID=1.
RECORD file := FindFile(1);
PRINT('<a href="' || EncodeValue(file.url) || '">'
|| EncodeHTML(file.title) || '</a>');