in my razor page I have.
<p>
<span>Website: </span>
<span>
<a href="@(Url.Encode(Model.PrimaryInfo.WebsiteUrl))" target="_blank">@Model.PrimaryInfo.WebsiteUrl</a>
</span>
</p>
when I inspect the element I see. the page displays as
Website: https://www.mywebsite.org/
when I inspect element I get
<a href="https%3a%2f%2fwww.mywebsite.org%2f" target="_blank">https://www.mywebsite.org/</a>
and when I click the link I get
[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (:).]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9939972
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53