We have moved!

We have moved to new site. This site is no more maintained. Please visit new site at: https://github.com/adriancs2/BBCode.net. Thanks.

Project Description
BBCode for ASP.NET, C#, VB.NET. Convert BBCode to Html.

Note: There is Another Better Option

After I have written this project, then later I found another better well developed tool:

Codekicker.BBCodehttps://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. 

Using BBCode.NET (this project)

BBCode.Net converts this:

[url=http://www.codeplex.com]Codeplex[/url]

into this:

<a href="http://www.codeplex.com">Codeplex</a>

Coding Example of Using This Project:

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);

Prevention of XSS Attack

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)