A blog about understanding and extending Episerver. May contain traces of posts not concerning Episerver.

XhtmlString: Render blocks and convert link to external without HtmlHelper

Here are two code snippets to help you make a XhtmlString display external links instead of the internal ones and also render blocks, dynamic content etc. This could be helpful if you don’t have access to a HtmlHelper like in a WebApi.

The first one just converts links. It loops through all fragments and converts internal UrlFragments to external.