fix(cloudfunc) encode space before render: " " -> " "

This commit is contained in:
coderaiser 2014-12-26 10:50:23 -05:00
parent 0cf714bf59
commit 52f41017d1

View file

@ -34,6 +34,10 @@ var Util;
this.CHANNEL_TERMINAL_RESIZE= 'terminal-resize';
this.MAX_FILE_SIZE = 500 * 1024;
function encodeSpace(str) {
return str.replace(/\s/g, ' ');
}
this.formatMsg = function(msg, name, status) {
if (!status)
status = 'ok';
@ -223,7 +227,7 @@ var Util;
linkResult = render(templateLink, {
link : link,
name : file.name,
name : encodeSpace(file.name),
attribute : attribute
});