diff options
Diffstat (limited to 'src/LexHTML.cxx')
| -rw-r--r-- | src/LexHTML.cxx | 5 | 
1 files changed, 4 insertions, 1 deletions
| 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; | 
