[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdepim/enterprise4/kdepimlibs
From:       Thomas McGuire <mcguire () kde ! org>
Date:       2009-09-23 16:29:39
Message-ID: 1253723379.873980.10626.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1027239 by tmcguire:

Merged revisions 1024435 via svnmerge from 
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/KDE/4.3/kdepimlibs

........
  r1024435 | tmcguire | 2009-09-16 18:05:31 +0200 (Wed, 16 Sep 2009) | 7 lines
  
  Backport r1024422 by tmcguire from trunk to the 4.3 branch:
  
  Escape URLs when converting to HTML, to prevent text from disappearing.
  
  Add a unit tests for the unit test commit message from David.
........


 _M            . (directory)  
 M  +1 -1      kpimutils/linklocator.cpp  
 M  +6 -1      kpimutils/tests/testlinklocator.cpp  


** branches/kdepim/enterprise4/kdepimlibs #property svnmerge-integrated
   - /branches/KDE/4.3/kdepimlibs:1-986158,990023,990532,990575,990631,990684,991932,9 \
96755,997101,997490,998251,1000615,1007460,1008037,1008812,1009437,1011841,1013328-1013331,1013810,1015198,1015975-1016224,1016226-1016229,1019800,1021325
  + /branches/KDE/4.3/kdepimlibs:1-986158,990023,990532,990575,990631,990684,991932,99 \
6755,997101,997490,998251,1000615,1007460,1008037,1008812,1009437,1011841,1013328-1013331,1013810,1015198,1015975-1016224,1016226-1016229,1019800,1021325,1024435
                
--- branches/kdepim/enterprise4/kdepimlibs/kpimutils/linklocator.cpp #1027238:1027239
@@ -373,7 +373,7 @@
           }
 
           str = str.replace( '&', "&amp;" );
-          result += "<a href=\"" + hyperlink + "\">" + str + "</a>";
+          result += "<a href=\"" + hyperlink + "\">" + Qt::escape( str ) + "</a>";
           x += locator.mPos - start;
           continue;
         }
--- branches/kdepim/enterprise4/kdepimlibs/kpimutils/tests/testlinklocator.cpp \
#1027238:1027239 @@ -24,7 +24,8 @@
 #include "testlinklocator.h"
 #include "testlinklocator.moc"
 
-QTEST_KDEMAIN( LinkLocatorTest, NoGUI )
+// GUI test, since the smileys use GUI stuff
+QTEST_KDEMAIN( LinkLocatorTest, GUI )
 
 #include "kpimutils/linklocator.h"
 using namespace KPIMUtils;
@@ -281,6 +282,10 @@
                       << "bla bla&nbsp;&nbsp;bla";
   QTest::newRow( "" ) << " bla bla \n bla bla a\n  bla bla " << 0x01
                       << "&nbsp;bla bla&nbsp;<br />\n&nbsp;bla bla a<br \
/>\n&nbsp;&nbsp;bla bla&nbsp;"; +
+  // Bug reported by dfaure, the <hostname> would get lost
+  QTest::newRow( "" ) << "KUrl url(\"http://strange<hostname>/\");" << (0x08 | 0x02)
+                      << "KUrl url(&quot;<a \
href=\"http://strange<hostname>/\">http://strange&lt;hostname&gt;/</a>&quot;);";  }
 
 void LinkLocatorTest::testHtmlConvert()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic