fixing banner formatting issues
when Unix hosts use lf vs cr/lf it doesn’t quite format right. converting these to fix that. I’m not sure if this is something to be solved in xterm.js, haven’t had time really review it.
This commit is contained in:
parent
8a96240cd3
commit
1725cdaa85
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -59,8 +59,10 @@ app.use(express.static(__dirname + '/public')).use(function(req, res, next) {
|
|||
|
||||
io.on('connection', function(socket) {
|
||||
var conn = new ssh();
|
||||
conn.on('banner', function(msg, lng) {
|
||||
socket.emit('data', msg);
|
||||
conn.on('banner', function(d) {
|
||||
//need to convert to cr/lf for proper formatting
|
||||
d = d.replace(/\n/g, "\r\n");
|
||||
socket.emit('data', d.toString('binary'));
|
||||
}).on('ready', function() {
|
||||
socket.emit('title', 'ssh://' + config.ssh.host);
|
||||
socket.emit('headerBackground', config.header.background);
|
||||
|
|
Loading…
Reference in a new issue