mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +02:00
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:
parent
ccb730c051
commit
5f45dd409b
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user