diff options
author | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-09-12 20:42:40 +0300 |
---|---|---|
committer | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-09-12 20:42:40 +0300 |
commit | 46e4e8f4dc968b7173aa37bb3e3bb944e5d63e10 (patch) | |
tree | 5878e37f3f1e292f170d94e37ad49c1edd04adc1 /lib | |
parent | a91101d0ac19e33b0f26acaa4c2f1207789641fb (diff) |
changed InlineDiffMarker to make it html_safe its output
updated the spec
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/inline_diff_marker.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/diff/inline_diff_marker.rb b/lib/gitlab/diff/inline_diff_marker.rb index 919965100ae..010b4be7b40 100644 --- a/lib/gitlab/diff/inline_diff_marker.rb +++ b/lib/gitlab/diff/inline_diff_marker.rb @@ -2,9 +2,10 @@ module Gitlab module Diff class InlineDiffMarker < Gitlab::StringRangeMarker def mark(line_inline_diffs, mode: nil) - super(line_inline_diffs) do |text, left:, right:| + mark = super(line_inline_diffs) do |text, left:, right:| %{<span class="#{html_class_names(left, right, mode)}">#{text}</span>} end + mark.html_safe end private |