[PATCH] Possible solution to fix #68747 and #66103

Andras Mantia amantia at kde.org
Tue Dec 2 12:40:42 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 Currently KHTML stops parsing the <head> </head> tag area for encoding 
information if an unexpected/invalid tag is found prior of <head> or inside 
<head></head>. This results in not detecting the correct encoding in those 
(broken) files. Mozilla/Opera recovers from such situations and detects the 
encoding properly, so I wonder why shouldn't KHTML do the same. Yes, they are 
broken files, but they can be found, and it wouldn't be the only case when 
there is code to handle broken pages.
The attached patch does it, but I don't have any idea if it's good or not. The 
only drawback I can see is that parsing such pages becomes somewhat slower.

Andras

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/zIhPTQdfac6L/08RAtr8AJ9QE6KzZs53XQMkUPMLl4jKuEazEQCg4/Lu
RPTaSxjtzBeG3aOdCqSiZK0=
=FOqR
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decoder.cpp.diff
Type: text/x-diff
Size: 368 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031202/c55576ac/attachment.diff>


More information about the kfm-devel mailing list