G
Guest
I want to change this method to Encode the text so that it covers situations
where for example below, it's showing the link as an inline text instead of a
link which should be clickable:
example string and what it's showing when rendered:
Stay tuned next week for part two of this series. Check out <a
href="http://www.la-cucina-italiana.com">www.la-cucina-italiana.com</a> to
learn more about Maria and her work.
So that should be encoded to show www.la-cucina-italiana.com as a link.
So in here, I want to encode the incoming text to cover those situations
with inline links.
protected string GetLinkText(string title)
{
return String.Format("{0}", title);
}
I tried something like this but obviously I'm not doing this right: return
Server.HtmlEncode(String.Format("{0}", title)).ToString;
where for example below, it's showing the link as an inline text instead of a
link which should be clickable:
example string and what it's showing when rendered:
Stay tuned next week for part two of this series. Check out <a
href="http://www.la-cucina-italiana.com">www.la-cucina-italiana.com</a> to
learn more about Maria and her work.
So that should be encoded to show www.la-cucina-italiana.com as a link.
So in here, I want to encode the incoming text to cover those situations
with inline links.
protected string GetLinkText(string title)
{
return String.Format("{0}", title);
}
I tried something like this but obviously I'm not doing this right: return
Server.HtmlEncode(String.Format("{0}", title)).ToString;