Menu

#1 Addition of 
instead of #13 for attributes

open
nobody
None
5
2013-01-15
2004-03-03
iolan
No

I'm not sure if it's allowed to make the change, but if
allowed, I would like the following change made.

Thanks in advance

Look for the text IOLAN MODIFICATION to see the
change made

procedure TXpNode.noOutputXpText(oMem :
TMemoryStream;
const sText : DOMString;
bAttribute : Boolean);
{Rewritten !!.57}
var
NewLen,
BufLen,
TxtLen,
x : Integer;
c : DOMChar;
s : DOMString;
Handled : Boolean;
NewText : DOMString;
begin
Assert((noOwnerDocument = nil)
or (TObject(noOwnerDocument) is TXpDocument));
x := 1;
NewLen := 0;
TxtLen := Length(sText);
BufLen := TxtLen * 2;
SetLength(NewText, BufLen);
if noOutputEscaping then begin
while (x <= TxtLen) do begin
Handled := False;
c := sText[x];
case c of

|
|
|
|
|

#10 :
begin
if bAttribute then begin
x := x + 1;
Handled := True;
XpDOMBufferAppend('&#xA;', NewText,
NewLen);
{ Cases:
MSWindows output - #xA, #xD translated to text
equivalent
Linux output - #xA should be left as is
}
end
else begin
{ See if linebreak needs to be replaced with
other characters. }
Handled := True;
{!!.56 - Old section of code moved to
noCheckForLineBreaks}
noCheckForLineBreaks(sText, NewText, x,
NewLen);
end;
end;
#13 :
begin
//IOLAN MODIFICATION
//Addition of bAttribute check
if bAttribute then begin
x := x + 1;
Handled := True;
XpDOMBufferAppend('&#xD;', NewText,
NewLen);
end
else begin
Handled := True;
noCheckForLineBreaks(sText, NewText, x,
NewLen);
end;
end;
end;
|
|
|
|
|
End;

Discussion


Log in to post a comment.