mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Don't encode html entities but escape quotes in JSON grid export. See http://www.heidisql.com/forum.php?t=22747#p22783
This commit is contained in:
@ -681,9 +681,9 @@ begin
|
||||
// JavaScript Object Notation
|
||||
Header := '{' + CRLF;
|
||||
if chkIncludeQuery.Checked then
|
||||
Header := Header + #9 + '"query": "'+HTMLSpecialChars(GridData.SQL)+'",' + CRLF
|
||||
Header := Header + #9 + '"query": '+EscapePHP(GridData.SQL)+',' + CRLF
|
||||
else
|
||||
Header := Header + #9 + '"table": "'+HTMLSpecialChars(TableName)+'",' + CRLF ;
|
||||
Header := Header + #9 + '"table": '+EscapePHP(TableName)+',' + CRLF ;
|
||||
Header := Header + #9 + '"rows":' + CRLF + #9 + '[';
|
||||
end;
|
||||
|
||||
@ -831,17 +831,15 @@ begin
|
||||
efJSON: begin
|
||||
tmp := tmp + #9#9#9;
|
||||
if chkIncludeColumnNames.Checked then
|
||||
tmp := tmp + EscapePHP(HTMLSpecialChars(Grid.Header.Columns[Col].Text)) + ': ';
|
||||
tmp := tmp + EscapePHP(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 + EscapePHP(Data);
|
||||
tmp := tmp + Data;
|
||||
else
|
||||
tmp := tmp + EscapePHP(HTMLSpecialChars(Data))
|
||||
tmp := tmp + EscapePHP(Data)
|
||||
end;
|
||||
tmp := tmp + ',' + CRLF;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user