API Reference

Class

HtmlUrlPolicy

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Modifiers sealed

Shared URL policy used by OfficeIMO HTML ingestion adapters before links or resource references are materialized.

Inheritance

  • Object
  • HtmlUrlPolicy

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

Methods

public HtmlUrlPolicy Clone() #
Returns: HtmlUrlPolicy

Creates a copy of the current policy instance.

public static HtmlUrlPolicy CreateEmbeddedResourceProfile() #
Returns: HtmlUrlPolicy

Creates an offline resource policy that accepts bounded embedded data while rejecting file and network schemes.

public static HtmlUrlPolicy CreateHyperlinkProfile() #
Returns: HtmlUrlPolicy

Creates a hyperlink policy that rejects script, file, and data URLs while allowing common web, mail, and telephone links.

public static HtmlUrlPolicy CreateOfficeIMOProfile() #
Returns: HtmlUrlPolicy

Creates the default OfficeIMO URL policy for trusted compatibility-oriented HTML ingestion.

public static HtmlUrlPolicy CreateWebOnlyProfile() #
Returns: HtmlUrlPolicy

Creates a restrictive web-only policy that accepts only HTTP, HTTPS, mail, and telephone links.

Properties

public Boolean DisallowScriptUrls { get; set; } #

When true, script-like URL schemes such as javascript: and vbscript: are rejected.

public Boolean DisallowFileUrls { get; set; } #

When true, file: URLs and Windows drive-path URL targets are rejected.

public Boolean AllowMailtoUrls { get; set; } #

When false, mailto: URLs are rejected.

public Boolean AllowDataUrls { get; set; } #

When false, data: URLs are rejected.

public Boolean AllowProtocolRelativeUrls { get; set; } #

When false, protocol-relative URLs such as //example.com/image.png are rejected unless callers resolve them first.

public Boolean RestrictUrlSchemes { get; set; } #

When true, absolute URLs must use a scheme listed in AllowedUrlSchemes. Relative URLs and fragments are still allowed by the evaluator.

public Func<String, String> ResolvedUrlTransform { get; set; } #

Optional trusted transform applied after a URL passes policy checks and base-URI resolution. Return null or an empty string to reject the resolved URL. Transformed values are checked against this policy again before use.

public HashSet<String> AllowedUrlSchemes { get; } #

URL schemes allowed when RestrictUrlSchemes is enabled.