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

List:       kde-commits
Subject:    kdelibs/khtml
From:       George Staikos <staikos () kde ! org>
Date:       2003-06-18 14:25:19
[Download RAW message or body]

CVS commit by staikos: 

compare target in lowercase


  M +9 -5      khtml_part.cpp   1.857


--- kdelibs/khtml/khtml_part.cpp  #1.856:1.857
@@ -2897,6 +2897,8 @@ void KHTMLPart::overURL( const QString &
 }
 
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const \
                QString &_target,
-                             KParts::URLArgs args )
+//
+// This executes in the active part on a click.
+//
+void KHTMLPart::urlSelected( const QString &url, int button, int state, const \
QString &_target, KParts::URLArgs args )  {
   bool hasTarget = false;
@@ -2909,8 +2911,10 @@ void KHTMLPart::urlSelected( const QStri
 
   // either ignore the target on javascript: as we do now and is
-  // inconsistent to other browsers, or make sure we don't create a XSS problem \
                here!
-  if ( (!hasTarget || target == "_self") && url.find( QString::fromLatin1( \
"javascript:" ), 0, false ) == 0 ) +  // inconsistent to other browsers, or make sure \
we don't create a XSS +  // problem here!
+  if ( (!hasTarget || _target.lower() == "_self") &&
+        url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
   {
-    executeScript( KURL::decode_string( url.right( url.length() - 11 ) ) );
+    executeScript( KURL::decode_string( url.mid( 11 ) ) );
     return;
   }


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

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