November Happy Hour will be moved to Thursday December 5th.

Class FriendlyHtmlRewriteToExternal

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Rewrite HTML URI:s in streams and strings.

Inheritance
System.Object
FriendlyHtmlRewriteToExternal
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class FriendlyHtmlRewriteToExternal : HtmlRewriteToExternal

Constructors

FriendlyHtmlRewriteToExternal(RebaseKind)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the FriendlyHtmlRewriteToExternal class.

Declaration
public FriendlyHtmlRewriteToExternal(RebaseKind rebaseKind)
Parameters
Type Name Description
RebaseKind rebaseKind

The type of rebasing to perform on the rewritten URL:s.

FriendlyHtmlRewriteToExternal(RebaseKind, IPermanentLinkMapper)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the FriendlyHtmlRewriteToExternal class.

Declaration
public FriendlyHtmlRewriteToExternal(RebaseKind rebaseKind, IPermanentLinkMapper permanentLinkMapper)
Parameters
Type Name Description
RebaseKind rebaseKind

The type of rebasing to perform on the rewritten URL:s.

IPermanentLinkMapper permanentLinkMapper

Used to map links

Methods

GetRewriteFilter(UrlBuilder, UrlBuilder, Encoding, Stream, out RewritePipe)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a rewrite filter stream

Declaration
public override Stream GetRewriteFilter(UrlBuilder internalUrl, UrlBuilder externalUrl, Encoding encoding, Stream stream, out RewritePipe rewritePipe)
Parameters
Type Name Description
UrlBuilder internalUrl

The internal URL.

UrlBuilder externalUrl

The external URL.

System.Text.Encoding encoding

The encoding to use when escaping URI:s

System.IO.Stream stream

The incoming stream.

RewritePipe rewritePipe

The rewrite pipe.

Returns
Type Description
System.IO.Stream

The filtered, rewritten, stream

Overrides

HtmlRewriteUrl(UrlBuilder, UrlBuilder, UrlBuilder, Encoding, out Object)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Rewrites an URL found as an URI in HTML text.

Declaration
protected virtual bool HtmlRewriteUrl(UrlBuilder internalUrl, UrlBuilder externalUrl, UrlBuilder url, Encoding encoding, out object internalObject)
Parameters
Type Name Description
UrlBuilder internalUrl

The internal context URL.

UrlBuilder externalUrl

The external context URL.

UrlBuilder url

The URL to rewrite

System.Text.Encoding encoding

The encoding to use when escaping the URL

System.Object internalObject

The internal object representation that may be returned (parameter is no being used)

Returns
Type Description
System.Boolean

IsHtmlUrlValidForRewrite(UrlBuilder, UrlBuilder)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether a given url is valid for rewrite, when interpreted in the context of the provided context URL.

Declaration
protected virtual bool IsHtmlUrlValidForRewrite(UrlBuilder contextUrl, UrlBuilder url)
Parameters
Type Name Description
UrlBuilder contextUrl

The url for the context that the url is present in

UrlBuilder url

The URL.

Returns
Type Description
System.Boolean

true if [is HTML URL valid for rewrite] [the specified internal URL]; otherwise, false.

IsUrlSchemeValid(UrlBuilder, UrlBuilder)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether URL scheme is valid for rewrite. Override this method if you want to add more valid schemes.

Declaration
protected virtual bool IsUrlSchemeValid(UrlBuilder contextUrl, UrlBuilder url)
Parameters
Type Name Description
UrlBuilder contextUrl

The context URL.

UrlBuilder url

The URL to validate.

Returns
Type Description
System.Boolean

true if URL scheme is valid; otherwise, false.

Remarks

Valid Url schemes are http, https and empty.

OnHtmlRewriteInit(HtmlRewriteEventArgs)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
protected override void OnHtmlRewriteInit(HtmlRewriteEventArgs e)
Parameters
Type Name Description
HtmlRewriteEventArgs e

The HtmlRewriteEventArgs instance containing the event data.

Overrides

OnHtmlRewritingUrl(UrlRewriteEventArgs)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
protected override void OnHtmlRewritingUrl(UrlRewriteEventArgs e)
Parameters
Type Name Description
UrlRewriteEventArgs e

The UrlRewriteEventArgs instance containing the event data.

Overrides

Extension Methods