What's my best bet for replacing plain text links with anchor tags in a string? .NET

Posted by Craig Bovis on Stack Overflow See other posts from Stack Overflow or by Craig Bovis
Published on 2010-05-10T15:51:05Z Indexed on 2010/05/10 15:54 UTC
Read the original article Hit count: 322

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about url