Skip to content

Commit

Permalink
Merge pull request #3525 from cisagov/bug/diagram-visio-import
Browse files Browse the repository at this point in the history
Bug/diagram visio import
  • Loading branch information
jekuipers authored Sep 20, 2023
2 parents c75784d + 2f7c752 commit 41a1526
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ CsetUtils.PersistDataToCSET = async function (editor, xml, revision) {
revision: revision
};


const bg = '#ffffff';
const xmlserializer = new XMLSerializer();
let svgRoot = editor.graph.getSvg(bg, 1, 0, true, null, true, true, null, null, false);
Expand All @@ -298,10 +299,11 @@ CsetUtils.PersistDataToCSET = async function (editor, xml, revision) {
await CsetUtils.saveDiagram(req);
}

function testForBase64(strValue){
function testForBase64(strValue) {
var base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
if (!base64regex.test(strValue)) {
return btoa(strValue);
//return btoa(strValue);
return Base64.encode(strValue);
}
return strValue;
}
Expand Down

0 comments on commit 41a1526

Please sign in to comment.