Permalink
Browse files

Made BBCodeTextNode public and added automatic line breaking

  • Loading branch information...
1 parent 2338e06 commit 04cc9db41df7763f1e891e2fd10ccb459d0dfbcc @charliesome committed Apr 10, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 BBCodeTextNode.cs
  2. +1 −1 Renderers/Html/ToHtml.cs
View
@@ -5,7 +5,7 @@
namespace bbsharp
{
- class BBCodeTextNode : BBCodeNode
+ public class BBCodeTextNode : BBCodeNode
{
public string InnerText {
get {
View
@@ -104,7 +104,7 @@ public static string ToHtml(this BBCodeNode Node, bool ThrowOnError)
public static string ToHtml(this BBCodeNode Node, bool ThrowOnError, object LookupTable)
{
if ((Node as BBCodeTextNode) != null)
- return HttpUtility.HtmlEncode(Node.ToString());
+ return HttpUtility.HtmlEncode(Node.ToString()).Replace("\n", "<br />");
var d = ((LookupT[])LookupTable).Where(x => ((LookupT)x).Key.ToLower() == Node.TagName.ToLower());
if (d.Count() > 0)

0 comments on commit 04cc9db

Please sign in to comment.