Project Description
BBCode for ASP.NET, C#, VB.NET. Convert BBCode to Html.
After I have written this project, then later I found another better well developed tool:
Codekicker.BBCode - https://bbcode.codeplex.com/
If you are going to use a ASP.NET BBCode Engine in production, you are strongly recommended to use Codekicker.BBCode.
Why Use Codekicker.BBCode?
Codekicker.BBCode is.....
Alternative Pre-Defined BBCode Parser: http://eksith.wordpress.com/2009/01/14/aspnet-bbcode-c
This project is not deleted or abandoned as it may serves for research and study purposes.
[url=http://www.codeplex.com]Codeplex[/url]
into this:
<a href="http://www.codeplex.com">Codeplex</a>
string BBCodeSyntax = "[url={webaddress}]{display}[/url]"; string HtmlSyntax = "<a href=\"{webaddress}\">{display}</a>"; string Fields = "{webaddress};{display}"; string input = "Project Hosting for Open Source Software - [url=http://codeplex.com]Codeplex[/url]"; string output = BBCode.ConvertToHtml(input, BBCodeSyntax, HtmlSyntax, Fields); Respond.Write(output);
BBCode.Net is currently not able to block XSS Attack (Cross-site Scripting). You have to implement your own AntiXSS engine. There is a nice AntiXSS engine provided by Microsoft (Read more: Microsoft Web Protection Library)
Read more about XSS Attack (Cross-site Scripting)