From e74e6e57737968d35c9929a6fcf91739186bef03 Mon Sep 17 00:00:00 2001 From: Murilo Polese Date: Thu, 6 Jul 2023 16:55:37 +0200 Subject: [PATCH 1/3] Clean characters on filenames too --- ui/arduino/store.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/arduino/store.js b/ui/arduino/store.js index 4297672..827ce45 100644 --- a/ui/arduino/store.js +++ b/ui/arduino/store.js @@ -166,7 +166,7 @@ function store(state, emitter) { let editor = state.cache(AceEditor, 'editor').editor let contents = cleanCharacters(editor.getValue()) editor.setValue(contents) - let filename = state.selectedFile || 'undefined' + let filename = cleanCharacters(state.selectedFile) || 'undefined' let deviceName = getDeviceName(state.selectedDevice) state.blocking = true @@ -511,7 +511,7 @@ function store(state, emitter) { }) emitter.on('save-filename', async (filename) => { log('save-filename', filename) - + filename = cleanCharacters(filename) // no changes if (state.selectedFile === filename) { state.isEditingFilename = false @@ -685,8 +685,6 @@ function resizeEditor(state) { } } - - function cleanCharacters(str) { return str.replace(/[\u{0080}-\u{FFFF}]/gu,"") } From 80a51d68d457a7bd0f962f65d27c2aa60bcd9582 Mon Sep 17 00:00:00 2001 From: Murilo Polese Date: Thu, 6 Jul 2023 16:57:21 +0200 Subject: [PATCH 2/3] Bump `micropython.js` minor bug version Fixes problem trimming files --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61b8694..e91a3b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "MIT", "dependencies": { "about-window": "^1.15.2", - "micropython.js": "github:arduino/micropython.js#v1.4.1" + "micropython.js": "github:arduino/micropython.js#v1.4.2" }, "devDependencies": { "electron": "^19.0.10", @@ -3303,8 +3303,8 @@ } }, "node_modules/micropython.js": { - "version": "1.4.1", - "resolved": "git+ssh://git@github.com/arduino/micropython.js.git#4648998e5df16a0f85e6e2c17ee1bd36d7a9b985", + "version": "1.4.2", + "resolved": "git+ssh://git@github.com/arduino/micropython.js.git#c44ffe6a895f1f5490cd9f833594e1ca6e49bd8c", "dependencies": { "serialport": "^10.4.0" }, diff --git a/package.json b/package.json index 7a80398..28bf8ef 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "license": "MIT", "dependencies": { "about-window": "^1.15.2", - "micropython.js": "github:arduino/micropython.js#v1.4.1" + "micropython.js": "github:arduino/micropython.js#v1.4.2" }, "engines": { "node": "18" From 55ceed85bee6364d3ed35ebf668d53fb028fbbf0 Mon Sep 17 00:00:00 2001 From: Ubi de Feo Date: Fri, 7 Jul 2023 13:53:44 +0200 Subject: [PATCH 3/3] handled edge case in which `null` might break `cleanCharacters` Co-authored-by: Akos Kitta <1405703+kittaakos@users.noreply.github.com> --- ui/arduino/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/arduino/store.js b/ui/arduino/store.js index 827ce45..0243456 100644 --- a/ui/arduino/store.js +++ b/ui/arduino/store.js @@ -166,7 +166,7 @@ function store(state, emitter) { let editor = state.cache(AceEditor, 'editor').editor let contents = cleanCharacters(editor.getValue()) editor.setValue(contents) - let filename = cleanCharacters(state.selectedFile) || 'undefined' + let filename = cleanCharacters(state.selectedFile || 'undefined') let deviceName = getDeviceName(state.selectedDevice) state.blocking = true pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy