diff options
| author | Agando <roduccomm@gmail.com> | 2026-06-06 06:00:27 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-06-06 06:00:27 +0200 |
| commit | ccc7d9956559d2195e20345e7a794662b52cd403 (patch) | |
| tree | 757354fbfec5c75b4577b2cb620d5ab1582e19b1 /modules/core/module-simplegui.js | |
| parent | b538577cd0a4292e4cd4ca1c9f9829fc7e133caa (diff) | |
auto: 2026-06-06_06:00 changes
Diffstat (limited to 'modules/core/module-simplegui.js')
| -rw-r--r-- | modules/core/module-simplegui.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/core/module-simplegui.js b/modules/core/module-simplegui.js index 78fa9b5..09d172a 100644 --- a/modules/core/module-simplegui.js +++ b/modules/core/module-simplegui.js @@ -29,8 +29,9 @@ } const label = args[0], command = args.slice(1).join(' '); const id = 'gui-btn-' + Date.now(); + const safeCmd = command.replace(/'/g, "\\'"); this.terminal.printHTML(`<div style="margin: 5px 0;"> - <button class="qa-btn" onclick="${command}" id="${id}">${label}</button> + <button class="qa-btn" onclick="(window.webx11||window).executeCommand('${safeCmd}')" id="${id}">${label}</button> </div>`); this.guiElements[id] = { type: 'button', label, command }; this.terminal.print(`Button '${label}' created`, "success"); |