Skip to content

Commit

Permalink
Merge pull request #6 from moxley/escape_output
Browse files Browse the repository at this point in the history
Properly escape data for injection into HTML
  • Loading branch information
fcoury committed Mar 5, 2014
2 parents 93e9ac7 + 9504334 commit 5e0dd82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rspec-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ class RSpecView extends ScrollView
addOutput: (output) =>

output = "#{output}"
output = output.replace /([^\s]*:[0-9]+)/g, (match) ->
output = output.replace /([^\s]*:[0-9]+)/g, (match) =>
file = match.split(":")[0]
line = match.split(":")[1]
"<a href='#{file}' data-line='#{line}' data-file='#{file}'>#{match}</a>"
$$$ -> @a href: file, 'data-line': line, 'data-file': file, match

@spinner.hide()
@output.append("#{output}")
Expand Down

0 comments on commit 5e0dd82

Please sign in to comment.