[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: patch for #776 - khtmlw bug fixed
From: David Faure <faure () kde ! org>
Date: 1999-03-21 21:51:03
[Download RAW message or body]
Following patch applied, tested, and bug marked as closed.
Thanks, Rich, for the report.
RCS file: /home/kde/kdelibs/khtmlw/Attic/htmltoken.cpp,v
retrieving revision 1.47
diff -u -p -r1.47 htmltoken.cpp
--- htmltoken.cpp 1999/01/05 16:17:20 1.47
+++ htmltoken.cpp 1999/03/21 21:30:56
@@ -357,14 +357,18 @@ void HTMLTokenizer::write( const char *s
// Check for &abc12 sequence
if (!isalnum(*src))
{
int len;
charEntity = false;
- searchBuffer[ searchCount+1] = '\0';
- res = charsets->convertTag(searchBuffer+1, len).copy();
- if (len <= 0)
- {
+ // check trailing char (only ";" is good HTML, but
+ // accept ' ', '&' and EOL too...) (David)
+ if (strchr("; &\r\n", searchBuffer[searchCount+1])) {
+ searchBuffer[ searchCount+1] = '\0';
+ res = charsets->convertTag(searchBuffer+1, len).copy();
+ if (len <= 0)
+ {
res = 0;
- }
+ }
+ }
}
}
--
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