[PATCH] khtml_part.cpp

Pascal Létourneau pletourn at globetrotter.net
Tue Dec 3 05:53:38 GMT 2002


Hi

If you select
kon<script><!-- --></script>qy
and paste it, you get
kon<!-- -->qy
after the patch, you get
konqy

Pascal Létourneau

Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.770
diff -u -3 -p -r1.770 khtml_part.cpp
--- khtml_part.cpp      2002/11/21 08:52:51     1.770
+++ khtml_part.cpp      2002/12/03 05:41:13
@@ -2301,8 +2313,14 @@ QString KHTMLPart::selectedText() const
         }
       }
       if(n == d->m_selectionEnd) break;
-      DOM::Node next = n.firstChild();
-      if(next.isNull()) next = n.nextSibling();
+      DOM::Node next;
+      if ( n.elementId() != ID_SCRIPT )
+      {
+       next = n.firstChild();
+        if(next.isNull()) next = n.nextSibling();
+      }
+      else
+       next = n.nextSibling();
       while( next.isNull() && !n.parentNode().isNull() ) {
         n = n.parentNode();
         next = n.nextSibling();





More information about the kfm-devel mailing list