diff options
Diffstat (limited to 'Swift/QtUI/ChatSnippet.h')
-rw-r--r-- | Swift/QtUI/ChatSnippet.h | 10 |
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%", "%message%"); + result.replace("%sender%", "%sender%"); + result.replace("%time%", "%%time%"); + result.replace("%shortTime%", "%%shortTime%"); + result.replace("%userIconPath%", "%userIconPath%"); + return result; + } protected: void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) { |