Class HtmlUrlParser
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Templates
Assembly: Umbraco.Core.dll
Syntax
public sealed class HtmlUrlParser
Constructors
View SourceHtmlUrlParser(IOptionsMonitor<ContentSettings>, ILogger<HtmlUrlParser>, IProfilingLogger, IIOHelper)
Declaration
public HtmlUrlParser(IOptionsMonitor<ContentSettings> contentSettings, ILogger<HtmlUrlParser> logger, IProfilingLogger profilingLogger, IIOHelper ioHelper)
Parameters
Type | Name | Description |
---|---|---|
IOptionsMonitor<ContentSettings> | contentSettings | |
ILogger<HtmlUrlParser> | logger | |
IProfilingLogger | profilingLogger | |
IIOHelper | ioHelper |
Methods
View SourceEnsureUrls(String)
The RegEx matches any HTML attribute values that start with a tilde (~), those that match are passed to ResolveUrl to replace the tilde with the application path.
Declaration
public string EnsureUrls(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text |
Returns
Type | Description |
---|---|
System.String |
Remarks
When used with a Virtual-Directory set-up, this would resolve all URLs correctly. The recommendation is that the "ResolveUrlsFromTextString" option (in umbracoSettings.config) is set to false for non-Virtual-Directory installs.