Filter Property  
 

Gets and sets the flags used to filter text content in the message.

Syntax

object.Filter [= value ]

Remarks

The Filter property specifies one or more bitflags which controls what the FilteredText property returns. This can be used to explicitly include or exclude certain content from the filtered text, such as insecure URLs or Unicode text. The following flags are supported:

Value Description
mimeFilterDefault Perform default filtering which removes HTML markup and decodes HTML entities. No additional filtering of URLs or text is performed.
mimeFilterRemoveQuery Remove query parameters from hyperlinks such as ?id=123. Useful for stripping tracking information or session data.
mimeFilterRemoveCredentials Remove embedded user credentials in URLs such as user:pass@example.com, preventing obfuscation or accidental disclosure.
mimeFilterRemoveLinks Remove all hyperlinks from the message content. This includes both anchor tags in HTML and plain text URLs.
mimeFilterRemoveUnicode Strip all non-ASCII (Unicode) characters from the message. Use this when only 7-bit clean output is required.
mimeFilterRejectLocal Reject any link that refers to internal or local domains, including .local, .lan, and localhost.
mimeFilterRejectIP Reject links that use raw IP addresses instead of hostnames, such as http://192.168.1.1.
mimeFilterRejectPunycode Reject hyperlinks using Punycode-encoded domain names, such as those with the xn-- prefix. This helps prevent spoofing using visually similar characters.
mimeFilterRejectHttp Reject any hyperlinks that use http:// instead of the secure https:// protocol.
mimeFilterRejectUnsafe Reject links using unsafe schemes such as file:, data:, or javascript:. These links are excluded by default unless overridden.
mimeFilterAllowPunycode Explicitly permit Punycode domain names in URLs even when mimeFilterRemoveUnicode is specified. Use when legitimate IDN domains are expected.
mimeFilterAllowUnsafe Allow potentially unsafe schemes such as file: or javascript: in message content. Use with caution and only when the message source is fully trusted.
mimeFilterStrict A combination of values which removes unsafe content, stripping insecure links, query parameters and credentials from URLs. This is the recommended value for maximum safety, filtering potentially malicious or misleading content from the current message part.

Data Type

Integer (Int32)

See Also

FilteredText Property, Text Property, TextLength Property, NormalizeText Method