'************************************************** ' FILE : BBCodeHtmlGenerator.vb ' AUTHOR : Paulo Santos ' CREATION : 5/2/2009 10:19:43 AM ' COPYRIGHT : Copyright © 2009 ' PJ on Development ' All Rights Reserved. ' ' Description: ' TODO: Add file description ' ' Change log: ' 0.1 5/2/2009 10:19:43 AM ' Paulo Santos ' Created. '*************************************************** ''' ''' Represnts an HTML generator for the . ''' Public NotInheritable Class BBCodeHtmlFormatter Implements ITextFormatter ''' ''' Generates the desired text from the specified source. ''' ''' The source to generate the text. ''' The text generated by the source. Public Function GenerateText(ByVal source As String) As String Implements ITextFormatter.Format Dim sb As New Text.StringBuilder(HtmlEncode(source)) sb.Replace(vbCrLf, vbLf) sb.Replace(vbCr, String.Empty) sb.Replace(vbLf, "
") Return sb.ToString() End Function End Class