The FilteredText property filters the HTML markup filtered from the
document text and returns output suitable for display in text-only
environments. HTML tags are removed and entities are converted
to their canonical Unicode equivalent. When filtering markup from the text,
the function will:
- Remove all leading and trailing whitespace from the text,
including newlines.
- Remove script, style, and other non-visible or unsafe elements.
- Convert common tag structures, such as lists and headers, into readable plain text.
- Extract and filter hyperlinks and image alt text, ignoring
internal links to other sections.
- Remove any embedded credentials in hyperlinks.
- Decode common HTML entities such as
&trade and
©, as well as numeric entities like  .
The function will remove extraneous whitespace within the text, but will
attempt to maintain the structure of ordered and unordered lists. It does
not parse the style information or Javascript that may be included in the
HTML content. If a paragraph uses a style that would normally prevent it from
being rendered in a browser (e.g.: the visibility attribute set to "hidden"),
it is ignored and the text will be included in the output. If there are
sections which contain preformatted text, such as text inside
<pre>...</pre> or <code>...</code>
tags, individual line and paragraph breaks will be preserved.
This function will not remove Unicode characters from the input
text. If the HTML markup includes any entities which are represented as
Unicode, such as ½ which represents "½",
they will be returned in the output string buffer as Unicode characters.
If you are using this control in Visual Basic, this could result in
characters which cannot be displayed by the standard controls such as Label
or TextBox. These controls attempt to convert Unicode to ANSI
using the system locale, which can result in garbled or missing characters.
To correctly display full Unicode text, you must use controls that support
Unicode natively, such as those in the Microsoft Forms 2.0 Object Library (FM20.DLL)
with appropriate font settings, or render the text using Windows API
functions.