Class HtmlUrlParser
Inheritance
System.Object
Namespace: Umbraco.Web.Templates
Assembly: Umbraco.Web.dll
Syntax
public sealed class HtmlUrlParser
Constructors
View SourceHtmlUrlParser(IContentSection, IProfilingLogger)
Declaration
public HtmlUrlParser(IContentSection contentSection, IProfilingLogger logger)
Parameters
Type | Name | Description |
---|---|---|
IContentSection | contentSection | |
IProfilingLogger | logger |
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.