summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-23 08:16:32 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-23 08:16:32 (GMT)
commit9ebea1ea14e8128256ce66fa4cd2e0c8523054af (patch)
treec213926c298f9cf4778a6550bd71ce47460abbd6
parentb5a852ab35d563e1730dfc12fd652a62cada5e8e (diff)
downloadswift-contrib-9ebea1ea14e8128256ce66fa4cd2e0c8523054af.zip
swift-contrib-9ebea1ea14e8128256ce66fa4cd2e0c8523054af.tar.bz2
Don't lose indentation in chat rendering.
Resolves: #1092
-rw-r--r--Swift/QtUI/ChatSnippet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Swift/QtUI/ChatSnippet.h b/Swift/QtUI/ChatSnippet.h
index 0d864c1..523a96c 100644
--- a/Swift/QtUI/ChatSnippet.h
+++ b/Swift/QtUI/ChatSnippet.h
@@ -28,18 +28,19 @@ namespace Swift {
}
static QString escape(const QString& original) {
QString result(original);
result.replace("%message%", "&#37;message&#37;");
result.replace("%sender%", "&#37;sender&#37;");
result.replace("%time%", "%&#37;time&#37;");
result.replace("%shortTime%", "%&#37;shortTime&#37;");
result.replace("%userIconPath%", "&#37;userIconPath&#37;");
+ result.replace(" ", "&nbsp;&nbsp;");
return result;
}
static QString timeToEscapedString(const QDateTime& time);
protected:
void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) {
continuationFallback_ = continuationFallback;
}