View Source
Class HtmlLocalLinkParser
Utility class used to parse internal links
Assembly: Umbraco.Core.dll
Syntax
public sealed class HtmlLocalLinkParser
Constructors
View Source
HtmlLocalLinkParser(IPublishedUrlProvider)
Declaration
public HtmlLocalLinkParser(IPublishedUrlProvider publishedUrlProvider)
Parameters
Methods
View Source
EnsureInternalLinks(string)
Parses the string looking for the {localLink} syntax and updates them to their correct links.
Declaration
public string EnsureInternalLinks(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
View Source
EnsureInternalLinks(string, bool)
Parses the string looking for the {localLink} syntax and updates them to their correct links.
Declaration
[Obsolete("This method overload is no longer used in Umbraco and delegates to the overload without the preview parameter. Scheduled for removal in Umbraco 18.")]
public string EnsureInternalLinks(string text, bool preview)
Parameters
| Type |
Name |
Description |
| string |
text |
|
| bool |
preview |
|
Returns
View Source
EnsureInternalLinks(string, UrlMode)
Parses the string looking for the {localLink} syntax and updates them to their correct links.
Declaration
public string EnsureInternalLinks(string text, UrlMode urlMode)
Parameters
| Type |
Name |
Description |
| string |
text |
|
| UrlMode |
urlMode |
|
Returns
View Source
FindLegacyLocalLinkIds(string)
Declaration
[Obsolete("This is a temporary method to support legacy formats until we are sure all data has been migration. Scheduled for removal in v18")]
public IEnumerable<HtmlLocalLinkParser.LocalLinkTag> FindLegacyLocalLinkIds(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
View Source
FindUdisFromLocalLinks(string)
Declaration
public IEnumerable<Udi?> FindUdisFromLocalLinks(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
| Type |
Description |
| IEnumerable<Udi> |
|