SAX readers: never transition from scText to scWhitespace state, and don't reset token while transitioning from scWhitespace to scText. This ensures that only pure-whitespace chunks are ever reported via IgnorableWhitespace event, and that text nodes are not broken into words.

This provides a partial fix for Mantis #14073.

git-svn-id: trunk@13355 -
This commit is contained in:
sergei 2009-07-01 22:00:22 +00:00
parent ccb730c051
commit 5f45dd409b
2 changed files with 2 additions and 6 deletions

View File

@ -193,12 +193,10 @@ begin
EnterNewScannerContext(scTag);
end;
else
EnterNewScannerContext(scText);
FScannerContext := scText;
end;
scText:
case Buffer[BufferPos] of
#9, #10, #13, ' ':
EnterNewScannerContext(scWhitespace);
'&':
begin
Inc(BufferPos);

View File

@ -184,12 +184,10 @@ begin
EnterNewScannerContext(scTag);
end;
else
EnterNewScannerContext(scText);
FScannerContext := scText
end;
scText:
case Buffer[BufferPos] of
#9, #10, #13, ' ':
EnterNewScannerContext(scWhitespace);
'&':
begin
Inc(BufferPos);