What's my best bet for replacing plain text links with anchor tags in a string? .NET
- by Craig Bovis
What is my best option for converting plain text links within a string into anchor tags?
Say for example I have "I went and searched on http://www.google.com/ today". I would want to change that to "I went and searched on http://www.google.com/ today".
The method will need to be safe from any kind of XSS attack also since the strings are user generated. They will be safe before parsing so I just need to make sure that no vulnerabilities are introduced through parsing the URLs.