HtmlExtensions.Linkify Method

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

Linkify(string, string)

Wraps an <a href=""></a> tag with the specified rel attribute around all urls in the text.

public static string Linkify(this string text, string rel = null)

Parameters

text
string

Text containing urls to linkify.

rel
string

The rel attribute to set on the anchors, e.g. "nofollow".

Returns

string

A string with all urls wrapped in anchors.