Determines if and how to convert Url's on conversion to XHTML.
| C# |
public HtmlEditor..::.UrlConversionType ConvertUrls { get; set; }
Internet Explorer unconditionally converts all Url's to absolute
when parsing HTML into the DOM. This causes the loss of any Url
relative path information that might have been entered. Firefox
and other browsers do not force this conversion.
Examples
By setting the ConvertUrls property the developer can force conversion of all site Url's to a uniform type across all browsers.
The conversions take place only if OutputXHTML is set to true.
The default is None.
With a mysite.com structure like this:
root
images
myimage.gif
pages
mypage.aspx
And given the following entered Url's on mypage.aspx:
http://www.mysite.com/images/myimage.gif
/images/myimage.gif
../images/myimage.gif
http://www.notmysite.com/images/someimage.gif
The Url's will be converted to the following, based on the ConvertUrls setting:
Absolute:
http://www.mysite.com/images/myimage.gif
http://www.mysite.com/images/myimage.gif
http://www.mysite.com/images/myimage.gif
http://www.notmysite.com/images/someimage.gif
Relative:
../images/myimage.gif
../images/myimage.gif
../images/myimage.gif
http://www.notmysite.com/images/someimage.gif
RootRelative:
/images/myimage.gif
/images/myimage.gif
/images/myimage.gif
http://www.notmysite.com/images/someimage.gif