HtmlExtensions.ToAbsoluteUrls Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

ToAbsoluteUrls(string, string)

Converts all relative urls within the provided html string to absolute urls.

public static string ToAbsoluteUrls(this string html, string baseurl = null)

Parameters

html
string

Html containing urls to convert.

baseurl
string

The base url to insert before all relative urls, e.g. http://www.tempuri.org/. When null ApplicationUrl is used.

Returns

string

A string with all relative urls converted to absolute urls.