Bug 99500 - digikam file property toolstip window: comments text interprets 'html' tags but it should not
Summary: digikam file property toolstip window: comments text interprets 'html' tags ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-i18n (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 01:41 UTC by Achim Bohnet
Modified: 2021-12-30 15:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Bohnet 2005-02-16 01:41:09 UTC
Version:           0.7.2-beta1 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-6)
OS:                Linux (i686) release 2.6.10-1-686

In early 0.7 cvs days there was a discussion how to interpret
contents of comments field and it was agreed to display
as is.   Comments displayed below thumbnail and html gallery
still use this convention but thumbnail tooltip that shows the
image properties does not.

My test case:   <b>bold</b> <it>italics</it>

Achim
Comment 1 Renchi Raju 2005-02-16 02:13:41 UTC
CVS commit by pahlibar: 



show tooltip text as actual text. also set format in commentseditor to 
use plaintext
BUGS: 99500


  M +3 -1      albumfiletip.cpp   1.21
  M +1 -0      imagedescedit.cpp   1.41


--- kdeextragear-3/digikam/digikam/albumfiletip.cpp  #1.20:1.21
@@ -385,4 +385,7 @@ QString AlbumFileTip::breakString(const 
     QString str = input.simplifyWhiteSpace();
 
+    str.replace(QChar('<'), "&lt;");
+    str.replace(QChar('>'), "&gt;");
+                 
     uint maxLen = 30;
 

--- kdeextragear-3/digikam/digikam/imagedescedit.cpp  #1.40:1.41
@@ -105,4 +105,5 @@ ImageDescEdit::ImageDescEdit(AlbumIconVi
     QVGroupBox* commentsBox = new QVGroupBox(i18n("Comments"), plainPage());
     m_commentsEdit = new KTextEdit(commentsBox);
+    m_commentsEdit->setTextFormat(QTextEdit::PlainText);
 #if KDE_IS_VERSION(3,2,0)
     m_commentsEdit->setCheckSpellingEnabled(true);


Comment 2 Renchi Raju 2005-02-16 19:49:06 UTC
CVS commit by pahlibar: 



Better solution. escape all html characters
CCBUGS: 99500


  M +2 -2      albumfiletip.cpp   1.22


--- kdeextragear-3/digikam/digikam/albumfiletip.cpp  #1.21:1.22
@@ -31,4 +31,5 @@
 #include <qpainter.h>
 #include <qapplication.h>
+#include <qstylesheet.h>
 
 // KDE includes.
@@ -385,6 +386,5 @@ QString AlbumFileTip::breakString(const 
     QString str = input.simplifyWhiteSpace();
 
-    str.replace(QChar('<'), "&lt;");
-    str.replace(QChar('>'), "&gt;");
+    str = QStyleSheet::escape(str);
                  
     uint maxLen = 30;


Comment 3 caulier.gilles 2021-12-30 15:50:22 UTC
Fixed with works from bug #438701 for next 7.5.0 release

Gilles Caulier