I have a razor page that I am building using content that has been saved in a database. As this content is from a wysiwyg, I convert it to a MvcHtmlString and then display it on my page.
ContentPageModel.Content = MvcHtmlString.Create(contentFromDb);
However, the editor we use preppends tildes to the links:
<p>Some text around a link <a href="~/contact">Contact Us<a></p>
And when I render the string in the view, it is not replacing the tilde - I just get the href output as is.
@Model.Content // renders as above without the tilde being converted
Is there a way to convert the tilde to the app path?