summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-12 13:03:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-12 13:03:52 (GMT)
commitfdd64842f071436a20dbf2ba52257d50bb7bc1a4 (patch)
tree812e7ff056d5b449540b80e9ac9dc98eb9584cb9 /Swift/QtUI/ChatSnippet.h
parentd073e9d261bb7134723e77f142603a555f8f9629 (diff)
downloadswift-fdd64842f071436a20dbf2ba52257d50bb7bc1a4.zip
swift-fdd64842f071436a20dbf2ba52257d50bb7bc1a4.tar.bz2
Move ChatSnippet::escape() to header.
Diffstat (limited to 'Swift/QtUI/ChatSnippet.h')
-rw-r--r--Swift/QtUI/ChatSnippet.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/ChatSnippet.h b/Swift/QtUI/ChatSnippet.h
index f323295..3aa5fcc 100644
--- a/Swift/QtUI/ChatSnippet.h
+++ b/Swift/QtUI/ChatSnippet.h
@@ -27,7 +27,15 @@ namespace Swift {
return appendToPrevious_;
}
- static QString escape(const QString&);
+ 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;");
+ return result;
+ }
protected:
void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) {