diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index e1b15f2..cb83713 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -387,7 +387,11 @@ jQuery(function($){ attr = attrs[i]; val = data.get(attr); if (typeof val === 'string') { - data.set(attr, val.trim()); + val = val.trim(); + if (attr === 'port' && val === '') { + val = 22; + } + data.set(attr, val); } } } diff --git a/webssh/templates/index.html b/webssh/templates/index.html index b1532ca..64a8a17 100644 --- a/webssh/templates/index.html +++ b/webssh/templates/index.html @@ -36,7 +36,7 @@