diff options
Diffstat (limited to 'scripts/minimaws/lib/assets')
-rw-r--r-- | scripts/minimaws/lib/assets/machine.js | 8 | ||||
-rw-r--r-- | scripts/minimaws/lib/assets/romident.js | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/minimaws/lib/assets/machine.js b/scripts/minimaws/lib/assets/machine.js index d0774d02c0a..d40dca12be0 100644 --- a/scripts/minimaws/lib/assets/machine.js +++ b/scripts/minimaws/lib/assets/machine.js @@ -136,7 +136,7 @@ var fetch_bios_sets = (function () { pending[device] = true; var req = new XMLHttpRequest(); - req.open('GET', appurl + 'rpc/bios/' + device, true); + req.open('GET', appurl + 'rpc/bios/' + encodeURIComponent(device), true); req.responseType = 'json'; req.onload = function () @@ -171,7 +171,7 @@ var fetch_machine_flags = (function () { pending[device] = true; var req = new XMLHttpRequest(); - req.open('GET', appurl + 'rpc/flags/' + device, true); + req.open('GET', appurl + 'rpc/flags/' + encodeURIComponent(device), true); req.responseType = 'json'; req.onload = function () @@ -413,7 +413,7 @@ function make_slot_change_handler(name, slot, defaults, dfltbtn) row.appendChild(document.createElement('th')).textContent = 'Short name:'; var link = row.appendChild(document.createElement('td')).appendChild(document.createElement('a')); link.textContent = selection.device; - link.setAttribute('href', appurl + 'machine/' + selection.device); + link.setAttribute('href', appurl + 'machine/' + encodeURIComponent(selection.device)); // if we have emulation flags, populate now, otherwise fetch asynchronously if (!Object.prototype.hasOwnProperty.call(machine_flags, selection.device)) @@ -487,7 +487,7 @@ function fetch_slots(machine) function make_request(device) { var req = new XMLHttpRequest(); - req.open('GET', appurl + 'rpc/slots/' + device, true); + req.open('GET', appurl + 'rpc/slots/' + encodeURIComponent(device), true); req.responseType = 'json'; req.onload = function () diff --git a/scripts/minimaws/lib/assets/romident.js b/scripts/minimaws/lib/assets/romident.js index 6db7a7f221a..cbe1af89fdf 100644 --- a/scripts/minimaws/lib/assets/romident.js +++ b/scripts/minimaws/lib/assets/romident.js @@ -145,7 +145,7 @@ function get_machine_table(shortname, description) var heading = div.appendChild(document.createElement('h2')); var link = heading.appendChild(document.createElement('a')); link.textContent = description; - link.setAttribute('href', appurl + 'machine/' + shortname); + link.setAttribute('href', appurl + 'machine/' + encodeURIComponent(shortname)); var table = div.appendChild(document.createElement('table')); machine_info[shortname] = table; add_matches(table, matched_names, null); |