diff --git a/index.html b/index.html index 1ddf242..6df038c 100644 --- a/index.html +++ b/index.html @@ -428,7 +428,7 @@

Processing

var fs = FS.fs; var elabJSON; var statusInfo; - const version = "24-10-25"; + const version = "08-11-25"; var blobb = []; const detailedInfo = document.getElementById("detailedStatus"); @@ -651,13 +651,13 @@

Processing

const extra_fields = res.metadata_decoded.extra_fields; const datahubURL = gitUrlCheck(extra_fields.datahub_url.value);; // const assayId = res.title.replaceAll(".", "-dot-").replaceAll("/", "-slash-"); - const assayId = res.title.replaceAll(/[^a-zA-Z0-9 ]/g, " "); + const assayId = res.title.replace(/\//g, "|").replace(/[^a-zA-Z0-9_.,\-+%$|(){}\[\]*=#?&$!^°<>;]/g, "_"); const fullname = res.fullname; const user = users.find(e=> e.fullname == fullname) const email = user.email; let protocol = res.body; const elabWWW= instance.replace("api/v2/", ""); - protocol = protocol.replaceAll(/\w+\.php\?mode=view/g, elabWWW+"/$&" ); + protocol = protocol.replace(/\w+\.php\?mode=view/g, elabWWW+"/$&" ); console.log("protocol is" + protocol); let markdown = turndownService.turndown(protocol); @@ -695,9 +695,9 @@

Processing

`+ protocol +` - ARC file path is `+ dir+`assays/`+assayId+`/protocols/eLabFTW_protocol.md + ARC file path is `+ dir+`assays/`+encodeURIComponent(assayId)+`/protocols/eLabFTW_protocol.md
- click to check the file + click to check the file ` @@ -709,23 +709,23 @@

Processing

const blobs = await fetchElabFiles( elabtoken, "experiments/"+ elabid+ "/uploads/"+ ele.id +"?format=´binary´",instance); blobb.push(blobs); let objectURL = URL.createObjectURL(blobs) - objectURL= objectURL.replaceAll( /&storage=./g , "" ); + objectURL= objectURL.replace( /&storage=./g , "" ); let data = new Uint8Array(await blobs.arrayBuffer()); // const extension = blobs.type.split("/").slice(-1)[0]; - const realname = ele.real_name; + const realname = ele.real_name.replace(/[^a-zA-Z0-9_,\-+%$|(){}\[\]*=#?&$!^°<>;]/g, "_"); const longname = ele.long_name; const path = "assays/"+assayId+"/dataset/"+index+"_"+realname; - const markdownPath = "assays/"+escape(assayId)+"/dataset/"+index+"_"+realname; + const markdownPath = "assays/"+encodeURIComponent(assayId)+"/dataset/"+index+"_"+realname; //filedict[longname] = datahubURL.slice(0,-4)+`/-/raw/main/`+path; //statusHTML = statusHTML.replaceAll( "app/download.php?f="+longname , objectURL ); - statusHTML = statusHTML.replaceAll( /app\/download\.php(.*)f=/g, "" ); + statusHTML = statusHTML.replace( /app\/download\.php(.*)f=/g, "" ); statusHTML = statusHTML.replaceAll( longname , objectURL ); statusHTML = statusHTML.replaceAll( "&storage=1" , "" ); statusHTML = statusHTML.replaceAll( "&storage=2" , "" ); - markdown = markdown.replaceAll(/app\/download\.php(.*)f=/g, "") - markdown = markdown.replaceAll(/&storage=./g, "") + markdown = markdown.replace(/app\/download\.php(.*)f=/g, "") + markdown = markdown.replace(/&storage=./g, "") markdown = markdown.replaceAll( longname , datahubURL.slice(0,-4)+`/-/raw/`+mainOrMaster+`/`+markdownPath ); await fs.promises.writeFile(dir+"/"+path , data); await git.add({ fs, dir: dir, filepath: path }); @@ -742,7 +742,7 @@

Processing

Submitted ARC file path is: `+path+`.
- click to check the file + click to check the file @@ -758,7 +758,7 @@

Processing

Submitted ARC file path is: `+path+`.
- click to check the file + click to check the file