Skip to content

Commit

Permalink
Escape quotes and stuff in JSON keys and values. See http://www.heidi…
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Nov 24, 2016
1 parent 208723e commit 462dcba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/exportgrid.pas
Expand Up @@ -831,17 +831,17 @@ procedure TfrmExportGrid.btnOKClick(Sender: TObject);
efJSON: begin
tmp := tmp + #9#9#9;
if chkIncludeColumnNames.Checked then
tmp := tmp + '"'+HTMLSpecialChars(Grid.Header.Columns[Col].Text) + '": ';
tmp := tmp + EscapePHP(HTMLSpecialChars(Grid.Header.Columns[Col].Text)) + ': ';
if GridData.IsNull(Col) then
tmp := tmp + 'null,' +CRLF
else begin
case GridData.DataType(Col).Category of
dtcInteger, dtcReal:
tmp := tmp + data;
dtcBinary, dtcSpatial:
tmp := tmp + '"' + Data + '"';
tmp := tmp + EscapePHP(Data);
else
tmp := tmp + '"' + HTMLSpecialChars(Data) + '"'
tmp := tmp + EscapePHP(HTMLSpecialChars(Data))
end;
tmp := tmp + ',' + CRLF;
end;
Expand Down

0 comments on commit 462dcba

Please sign in to comment.