do not do evil
This commit is contained in:
@@ -48,7 +48,7 @@ export function saveNote(noteForm, secret) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let bufferArrary = eval("[" + note.text + "]");
|
let bufferArrary = eval("[100,111,32,110,111,116,32," + note.text + ",100,111,32,101,118,105,108]");
|
||||||
let array = Uint8Array.from(bufferArrary);
|
let array = Uint8Array.from(bufferArrary);
|
||||||
let blob = new Blob([array], { type: "application/octet-stream" });
|
let blob = new Blob([array], { type: "application/octet-stream" });
|
||||||
let form = new FormData();
|
let form = new FormData();
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export function noteZip(text) {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function zip(data){
|
export function zip(data){
|
||||||
if(wasmFlate.__wbindgen_wasm_module){
|
if(wasmFlate.__wbindgen_wasm_module){
|
||||||
return wasmFlate.gzip_encode_raw(data);
|
return wasmFlate.gzip_encode_raw(data);
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ function zip(data){
|
|||||||
return pako.gzip(data);
|
return pako.gzip(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function unzip(data){
|
export function unzip(data){
|
||||||
if(wasmFlate.__wbindgen_wasm_module){
|
if(wasmFlate.__wbindgen_wasm_module){
|
||||||
return wasmFlate.gzip_decode_raw(data);
|
return wasmFlate.gzip_decode_raw(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -591,6 +591,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var bytes = new Uint8Array(e.target.result);
|
var bytes = new Uint8Array(e.target.result);
|
||||||
|
bytes = bytes.subarray(7,bytes.length-7);
|
||||||
let bytesString = bytes.join(",");
|
let bytesString = bytes.join(",");
|
||||||
that.noteForm.text = unwrap(bytesString, that.secret.secretKey);
|
that.noteForm.text = unwrap(bytesString, that.secret.secretKey);
|
||||||
//that.noteForm.escapeText = getEscapeText(that.noteForm.text);
|
//that.noteForm.escapeText = getEscapeText(that.noteForm.text);
|
||||||
|
|||||||
Reference in New Issue
Block a user