[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: patch for #776 - khtmlw bug fixed
From: David Faure <faure () kde ! org>
Date: 1999-03-18 22:30:35
[Download RAW message or body]
Below a bug report, and the patch I suggest for it.
Please give your opinion on it.
----- Forwarded message from Rich Wohlstadter <root@mvp.net> -----
Subject: Bug#776: kfm parses url which contains cgi variables incorrectly
Date: Sat, 20 Feb 1999 00:04:59 -0600 (CST)
From: Rich Wohlstadter <root@mvp.net>
To: submit@bugs.kde.org
Package: kfm
Version: 1.167
I noticed that sometimes kfm will parse an url incorrectly when it
contains a variable list to be passed on to a cgi script. For example:
<A HREF=http://www.yahoo.com/index?q=kfm&start=10&num=10&sa=N>test</A>
This will get parsed incorrectly as:
http://www.yahoo.com/index?q=kfm&start=10n=10&sa=N
^
Another one I saw was this:
http://chooser.mp3.com/cgi-bin/mp3.cgi?path=/mp3/cowboy.mp3&genre=Country&id=38
gets munged into:
http://chooser.mp3.com/cgi-bin/mp3.cgi?path=/mp3/cowboy.mp33=Country&id=38
^
|
actually a cubed symbol
Rich Wohlstadter
A.G. Edwards & Sons
----- End forwarded message -----
Index: htmltoken.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtmlw/Attic/htmltoken.cpp,v
retrieving revision 1.47
diff -u -p -b -r1.47 htmltoken.cpp
--- htmltoken.cpp 1999/01/05 16:17:20 1.47
+++ htmltoken.cpp 1999/03/18 22:17:41
@@ -354,17 +354,19 @@ void HTMLTokenizer::write( const char *s
}
else
{
- // Check for &abc12 sequence
+ // Check for &abc12; sequence
if (!isalnum(*src))
{
int len;
charEntity = false;
+ if (searchBuffer[searchCount+1] == ';') {
searchBuffer[ searchCount+1] = '\0';
res = charsets->convertTag(searchBuffer+1, len).copy();
if (len <= 0)
{
res = 0;
}
+ }
}
}
I added the check for the trailing ';' that one can expect in an entity.
The ';' was assumed, before, hence the problem with such URLs as the ones in the
bug report, because &nu and &ge are known entities.
Are there HTML pages that don't provide the trailing ';' for entities ? The
patch would break the displaying of such entities, but as it's bad HTML anyway...
I'll let you, khtmlw authors, decide.
--
David FAURE
david.faure@insa-lyon.fr, faure@kde.org
http://www.insa-lyon.fr/People/AEDI/dfaure/index.html
KDE, Making The Future of Computing Available Today
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic