Skip to content

Commit

Permalink
Merge commit '95b50c3601150ff3a361179a06592cc8dab477ca' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Apr 12, 2024
2 parents 3fee9d7 + 95b50c3 commit 01b07f5
Show file tree
Hide file tree
Showing 3 changed files with 315 additions and 321 deletions.
2 changes: 1 addition & 1 deletion drawio
Submodule drawio updated 110 files
8 changes: 7 additions & 1 deletion src/main/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ const BKP_EXT = '.bkp';

/**
* Checks the file content type
* Confirm content is xml, pdf, png, jpg, svg, vsdx ...
* Confirm content is xml, json, pdf, png, jpg, svg, vsdx ...
*/
function checkFileContent(body, enc)
{
Expand Down Expand Up @@ -1968,6 +1968,12 @@ function checkFileContent(body, enc)
return true;
}

// json
if (c1 == '{' || c1 == '[')
{
return true;
}

// mxfile, mxlibrary, mxGraphModel
if (c1 == '<' && c2 == 'm' && c3 == 'x')
{
Expand Down
Loading

0 comments on commit 01b07f5

Please sign in to comment.