HtmlUrlPolicy
OfficeIMO.Html
Shared URL policy used by OfficeIMO HTML ingestion adapters before links or resource references are materialized.
Inheritance
- object
- HtmlUrlPolicy
Usage
Explore 29 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 15
- Property HtmlConversionDocumentOptions.ResourceUrlPolicy
- Property HtmlConversionDocumentOptions.UrlPolicy
- Property HtmlNormalizationOptions.ResourceUrlPolicy
- Property HtmlNormalizationOptions.UrlPolicy
- Property HtmlRenderOptions.ResourceUrlPolicy
- Property HtmlRenderOptions.UrlPolicy
- Property HtmlResourcePipelineOptions.ResourceUrlPolicy
- Property HtmlResourcePipelineOptions.UrlPolicy
- Property HtmlResourceSession.ResourcePolicy
- Method HtmlUrlPolicy.Clone
- Method HtmlUrlPolicy.CreateEmbeddedResourceProfile
- Method HtmlUrlPolicy.CreateHyperlinkProfile
- Method HtmlUrlPolicy.CreateOfficeIMOProfile
- Method HtmlUrlPolicy.CreateWebOnlyProfile
- Method HtmlUrlPolicy.CreateWebResourceProfile
Accepted by parameters 14
- Method HtmlImageSourceResolver.ResolveFirstSrcSetCandidate
- Method HtmlImageSourceResolver.ResolveImageSource
- Method HtmlImageSourceResolver.ResolveImageSourceCandidates
- Method HtmlImageSourceResolver.ResolveNormalizedSrcSet
- Method HtmlImageSourceResolver.ResolveNormalizedSrcSetAttributes
- Method HtmlImageSourceResolver.ResolvePictureSource
- Method HtmlImageSourceResolver.ResolvePictureSourceCandidates
- Method HtmlImageSourceResolver.ResolveSrcSetCandidates
- Method HtmlImageSourceResolver.ResolveUrlAttributes
- Method HtmlImageSourceResolver.ResolveUrlFromSrcSet
- Method HtmlImageSourceResolver.ResolveUrlFromSrcSetAttributes
- Constructor HtmlResourceSession.HtmlResourceSession
- Method HtmlUrlPolicyEvaluator.IsAllowed
- Method HtmlUrlPolicyEvaluator.ResolveUrl
Constructors
public HtmlUrlPolicy() #Methods
public static HtmlUrlPolicy CreateEmbeddedResourceProfile() #Creates an offline resource policy that accepts bounded embedded data while rejecting file and network schemes.
Returns
HtmlUrlPolicypublic static HtmlUrlPolicy CreateHyperlinkProfile() #Creates a hyperlink policy that rejects script, file, and data URLs while allowing common web, mail, and telephone links.
Returns
HtmlUrlPolicypublic static HtmlUrlPolicy CreateOfficeIMOProfile() #Creates the default OfficeIMO URL policy for trusted compatibility-oriented HTML ingestion.
Returns
HtmlUrlPolicypublic static HtmlUrlPolicy CreateWebOnlyProfile() #Creates a restrictive web-only policy that accepts only HTTP, HTTPS, mail, and telephone links.
Returns
HtmlUrlPolicypublic static HtmlUrlPolicy CreateWebResourceProfile() #Creates a resource policy that accepts only HTTP and HTTPS network references. Mail, telephone, script, file, and data URLs are rejected.
Returns
HtmlUrlPolicyInherited Methods
Properties
public bool DisallowScriptUrls { get; set; } #When true, script-like URL schemes such as javascript: and vbscript: are rejected.
public bool DisallowFileUrls { get; set; } #When true, file: URLs and Windows drive-path URL targets are rejected.
public bool AllowMailtoUrls { get; set; } #When false, mailto: URLs are rejected.
public bool AllowProtocolRelativeUrls { get; set; } #When false, protocol-relative URLs such as //example.com/image.png are rejected unless callers resolve them first.
public bool RestrictUrlSchemes { get; set; } #When true, absolute URLs must use a scheme listed in HtmlUrlPolicy.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 HtmlUrlPolicy.RestrictUrlSchemes is enabled.