diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index 0b5be258..32aee1e3 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -34,8 +34,13 @@ var Util; this.CHANNEL_TERMINAL_RESIZE= 'terminal-resize'; this.MAX_FILE_SIZE = 500 * 1024; - function encodeSpace(str) { - return str.replace(/\s/g, ' '); + function encodeEntities(str) { + str = str + .replace(/\s/g, ' ') + .replace(//g, '>'); + + return str; } this.formatMsg = function(msg, name, status) { @@ -227,7 +232,7 @@ var Util; linkResult = render(templateLink, { link : link, - name : encodeSpace(file.name), + name : encodeEntities(file.name), attribute : attribute });