Commit ba72c6f683fc52a3223c45c5044abf1361e059fd

Authored by Robert Speicher
1 parent 496f88af

Escape text passed directly to gfm

app/views/events/_commit.html.haml
... ... @@ -5,4 +5,4 @@
5 5 %strong.cdark= commit.author_name
6 6 –
7 7 = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
8   - = gfm truncate(commit.title, length: 50) rescue "--broken encoding"
  8 + = gfm escape_once(truncate(commit.title, length: 50)) rescue "--broken encoding"
... ...
app/views/issues/show.html.haml
... ... @@ -31,7 +31,7 @@
31 31 .alert-message.error.status_info Closed
32 32 - else
33 33 .alert-message.success.status_info Open
34   - = gfm @issue.title
  34 + = gfm escape_once(@issue.title)
35 35  
36 36 .middle_box_content
37 37 %cite.cgray Created by
... ...
app/views/merge_requests/show/_mr_box.html.haml
... ... @@ -5,7 +5,7 @@
5 5 .alert-message.error.status_info Closed
6 6 - else
7 7 .alert-message.success.status_info Open
8   - = gfm @merge_request.title
  8 + = gfm escape_once(@merge_request.title)
9 9  
10 10 .middle_box_content
11 11 %div
... ...
app/views/milestones/show.html.haml
... ... @@ -21,7 +21,7 @@
21 21 .alert-message.error.status_info Closed
22 22 - else
23 23 .alert-message.success.status_info Open
24   - = gfm @milestone.title
  24 + = gfm escape_once(@milestone.title)
25 25 %small.right= @milestone.expires_at
26 26  
27 27 .middle_box_content
... ...
app/views/repositories/_branch.html.haml
... ... @@ -11,7 +11,7 @@
11 11 %code= commit.short_id
12 12  
13 13 = image_tag gravatar_icon(commit.author_email), class: "", width: 16
14   - = gfm truncate(commit.title, length: 40)
  14 + = gfm escape_once(truncate(commit.title, length: 40))
15 15 %span.update-author.right
16 16 = time_ago_in_words(commit.committed_date)
17 17 ago
... ...
app/views/repositories/_feed.html.haml
... ... @@ -13,7 +13,7 @@
13 13 = link_to project_commits_path(@project, commit.id) do
14 14 %code= commit.short_id
15 15 = image_tag gravatar_icon(commit.author_email), class: "", width: 16
16   - = gfm truncate(commit.title, length: 40)
  16 + = gfm escape_once(truncate(commit.title, length: 40))
17 17 %td
18 18 %span.right.cgray
19 19 = time_ago_in_words(commit.committed_date)
... ...
app/views/repositories/tags.html.haml
... ... @@ -17,7 +17,7 @@
17 17 = link_to project_commit_path(@project, commit.id) do
18 18 %code= commit.short_id
19 19 = image_tag gravatar_icon(commit.author_email), class: "", width: 16
20   - = gfm truncate(commit.title, length: 40)
  20 + = gfm escape_once(truncate(commit.title, length: 40))
21 21 %td
22 22 %span.update-author.right
23 23 = time_ago_in_words(commit.committed_date)
... ...