Skip to content

Commit abd2067

Browse files
author
Samuel Huylebroeck
committed
Fix Xmlworker eating chars when parsing &
When Xmlworker encountered a '&' followed by a ' ', it would leave the special char state without appending the ' '. SUP-1596
1 parent 7e2c39d commit abd2067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extras/itextsharp.xmlworker/iTextSharp/tool/xml/parser/state/SpecialCharState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ virtual public void Process(char character) {
8585
this.parser.Memory().CurrentEntity().Length = 0;
8686
} else if (character != '#' && (character < '0' || character > '9') && (character < 'a' || character > 'z')
8787
&& (character < 'A' || character > 'Z') || entity.Length >= 7) {
88-
parser.Append('&').Append(entity.ToString());
88+
parser.Append('&').Append(entity.ToString()).Append(character);
8989
parser.SelectState().PreviousState();
9090
this.parser.Memory().CurrentEntity().Length = 0;
9191
} else {

0 commit comments

Comments
 (0)