From 34283cad390f33eec27eed5648fe873a8558a6dd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 12 Jun 2009 01:53:56 +0000 Subject: =?UTF-8?q?Fix=20for=20bug=20#2804760=20=C2=97=20is=20a=203=20byte?= =?UTF-8?q?=20character=20in=20UTF-8=20and=20the=20XML=20lexer=20decided?= =?UTF-8?q?=20it=20wasn't=20a=20valid=20entity=20after=20the=20first=20byt?= =?UTF-8?q?e=20leading=20to=20drawing=20broken=20part=20characters.=20Fixe?= =?UTF-8?q?d=20in=20the=20lexer=20by=20not=20including=20the=20initial=20b?= =?UTF-8?q?yte=20in=20the=20entity=20def=20style.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LexHTML.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/LexHTML.cxx') diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index b146d071d..a8d7e2711 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -1132,7 +1132,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } if (ch != '#' && !(isascii(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... && ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML - styler.ColourTo(i, SCE_H_TAGUNKNOWN); + if (!isascii(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style + styler.ColourTo(i-1, SCE_H_TAGUNKNOWN); + else + styler.ColourTo(i, SCE_H_TAGUNKNOWN); state = SCE_H_DEFAULT; } break; -- cgit v1.2.3