Skip to content

Commit

Permalink
Escape angle brackets in help http route output
Browse files Browse the repository at this point in the history
  • Loading branch information
tombell committed Aug 8, 2012
1 parent ec6309a commit dc8ad3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scripts/help.coffee
Expand Up @@ -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) ->
Expand Down

0 comments on commit dc8ad3c

Please sign in to comment.