From 2c0dfd5bfbd3871e5365f72e2d10176e5fad4836 Mon Sep 17 00:00:00 2001
From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com>
Date: Wed, 8 Sep 2010 17:56:04 +0000
Subject: [PATCH] Empty quotes are skipped in UBBParser
---
Common/BBCodes/Quote.cs | 5 ++++-
Core/extensions/String.cs | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/Common/BBCodes/Quote.cs b/Common/BBCodes/Quote.cs
index ced7d04..05af91b 100644
--- a/Common/BBCodes/Quote.cs
+++ b/Common/BBCodes/Quote.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using FLocal.Core;
using PJonDevelopment.BBCode;
namespace FLocal.Common.BBCodes {
@@ -12,9 +13,11 @@ namespace FLocal.Common.BBCodes {
}
public override string Format(ITextFormatter formatter) {
+ string inner = this.GetInnerHTML(formatter).TrimHtml();
+ if(inner == "") return "";
string marker = this.Default;
if(marker == null) marker = "Quote:";
- return "
" + marker + "
" + this.GetInnerHTML(formatter).Trim() + "
" + marker + "
" + inner + "