Escape arguments passed to dev-center

This commit is contained in:
Nariman Jelveh
2024-07-17 18:32:02 -07:00
parent 29f919c98a
commit 4d6edff169

View File

@@ -62,21 +62,20 @@ if(domain === 'puter.localhost'){
static_hosting_domain = 'site.puter.localhost';
}
// port
// add port to static_hosting_domain if provided
if (URLParams.has('puter.port') && URLParams.get('puter.port')) {
static_hosting_domain = static_hosting_domain + `:` + URLParams.get('puter.port');
static_hosting_domain = static_hosting_domain + `:` + html_encode(URLParams.get('puter.port'));
}
// protocol
let protocol = 'https';
if (URLParams.has('puter.protocol')) {
protocol = URLParams.get('puter.protocol');
}
if (URLParams.has('puter.protocol') && URLParams.get('puter.protocol') === 'http')
protocol = 'http';
// port
let port = '';
if (URLParams.has('puter.port') && URLParams.get('puter.port')) {
port = URLParams.get('puter.port');
port = html_encode(URLParams.get('puter.port'));
}
$(document).ready(function () {