summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_file_header.html.haml
diff options
context:
space:
mode:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-11 11:17:59 -0400
committerGitLab Development <gitlab@local.local>2017-09-11 15:20:31 +0000
commita91101d0ac19e33b0f26acaa4c2f1207789641fb (patch)
treef10355cb20461bb48b8b618a5bdcf81e49de36c7 /app/views/projects/diffs/_file_header.html.haml
parentd70c3bbc149177037490c404a42896d8b486fbe8 (diff)
downloadgitlab-ce-a91101d0ac19e33b0f26acaa4c2f1207789641fb.tar.gz
rework the html_safe not to use haml's auto escaping
add feature test for inline diff in file header
Diffstat (limited to 'app/views/projects/diffs/_file_header.html.haml')
-rw-r--r--app/views/projects/diffs/_file_header.html.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml
index 466a628b746..d5b9f328098 100644
--- a/app/views/projects/diffs/_file_header.html.haml
+++ b/app/views/projects/diffs/_file_header.html.haml
@@ -17,12 +17,12 @@
= blob_icon diff_file.b_mode, diff_file.file_path
- if diff_file.renamed_file?
- - old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
+ - old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path).map(&:html_safe)
%strong.file-title-name.has-tooltip{ data: { title: diff_file.old_path, container: 'body' } }
- != old_path
+ = old_path
&rarr;
%strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path, container: 'body' } }
- != new_path
+ = new_path
- else
%strong.file-title-name.has-tooltip{ data: { title: diff_file.file_path, container: 'body' } }
= diff_file.file_path