Bug 56942 - cervisiapart: cvs comments containing html tags
Summary: cervisiapart: cvs comments containing html tags
Status: RESOLVED FIXED
Alias: None
Product: cervisia
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Bernd Gehrmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-07 11:35 UTC by Pascal Cavy
Modified: 2003-04-18 17:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
html tags beeing erroneously interpreted in the log window below (77.45 KB, image/png)
2003-04-07 11:36 UTC, Pascal Cavy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Cavy 2003-04-07 11:35:36 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Mandrake RPMs

cvs comments containing html tags should not be interpreted in the cvs log window

see the snapshot resulting from the cvs comment :
"use <button><img ...></button> tags instead of <input type='image'> because the input value is not posted with the latter"
Comment 1 Pascal Cavy 2003-04-07 11:36:34 UTC
Created attachment 1317 [details]
html tags beeing erroneously interpreted in the log window below
Comment 2 Christian Loose 2003-04-18 17:07:16 UTC
Subject: kdesdk/cervisia

CVS commit by cloose: 

Fix BR #56942: 
Escape output lines for protocol view, so html tags in 
commit messages aren't interpreted.

CCMAIL: 56942-done@bugs.kde.org


  M +2 -0      ChangeLog   1.70
  M +7 -2      protocolview.cpp   1.17


--- kdesdk/cervisia/ChangeLog  #1.69:1.70
@@ -3,4 +3,6 @@
         * Fix BR 56042: Better default colors for white
           background
+        * Fix BR 56942: Escape output lines for protocol view
+          so html tags in commit messages aren't interpreted
 
 2003-02-28  Christian Loose  <christian.loose@hamburg.de>

--- kdesdk/cervisia/protocolview.cpp  #1.16:1.17
@@ -214,4 +214,8 @@ void ProtocolView::processOutput()
 void ProtocolView::appendLine(const QString &line)
 {
+    // Escape output line, so that html tags in commit
+    // messages aren't interpreted
+    const QString escapedLine = QStyleSheet::escape(line);
+
     QColor color;
     // Colors are the same as in UpdateViewItem::paintCell()
@@ -225,6 +229,7 @@ void ProtocolView::appendLine(const QStr
 
     append(color.isValid()
-           ? QString("<font color=\"%1\">%2</font>").arg(color.name()).arg(line)
-           : QString("%1").arg(line));
+           ? QString("<font color=\"%1\">%2</font>").arg(color.name())
+                                                    .arg(escapedLine)
+           : QString("%1").arg(escapedLine));
 }