Permalink
Browse files

Escape angle brackets in help http route output

  • Loading branch information...
1 parent ec6309a commit dc8ad3cf944b9d698e849501d9a8b58430d49b8f @tombell tombell committed Aug 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/scripts/help.coffee
View
3 src/scripts/help.coffee
@@ -52,7 +52,8 @@ helpContents = (name, commands) ->
module.exports = (robot) ->
robot.respond /help\s*(.*)?$/i, (msg) ->
- cmds = robot.helpCommands()
+ cmds = robot.helpCommands().map (cmd) ->
+ cmd.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')
if msg.match[1]
cmds = cmds.filter (cmd) ->

0 comments on commit dc8ad3c

Please sign in to comment.