ConvertHtmlToPlainText (open)

Convert a HTML blob to plain text

Syntax

LOADLIB "wh::filetypes/html.whlib";

BLOB FUNCTION ConvertHtmlToPlainText(BLOB htmldoc, RECORD options)

Parameters

BLOB htmldoc

Document to convert

RECORD options

Conversion options

encoding

Encoding for the HTML document (leave empty for autodetect)

imagehandling

Image handling (0=convert to ALT tag. 1=convert to Witty-safe alttags)

linkresolver

Macro ptr to hyperlink resolver object (needed for figuring out if witty links should be escaped)

suppress_urls

Set to TRUE to prevent hyperlink url's from being printed

unix_newlines

Set to TRUE us use \n instead of \r\n as newlines

Return value

BLOB

The plain text document