Skip to content

Commit beb5e1b

Browse files
committed
Sanitize glm helper
1 parent adeeae9 commit beb5e1b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

app/assets/stylesheets/sections/notes.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#new_note {
3333
.note-text {
34-
height:25px;
34+
height:40px;
3535
}
3636
.attach_holder {
3737
display:none;
@@ -212,3 +212,8 @@ td .line_note_link {
212212
}
213213
}
214214
}
215+
216+
.note-text {
217+
border: 1px solid #aaa;
218+
box-shadow:none;
219+
}

app/helpers/gitlab_markdown_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def gfm(text, html_options = {})
3131
extractions[$1]
3232
end
3333

34-
text.html_safe
34+
sanitize text.html_safe
3535
end
3636

3737
# Use this in places where you would normally use link_to(gfm(...), ...).

app/views/notes/_per_line_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
= f.text_area :note, size: 255, class: 'line-note-text'
1717
.note_actions
1818
.buttons
19-
= f.submit 'Add note', class: "btn primary submit_note submit_inline_note", id: "submit_note"
19+
= f.submit 'Add note', class: "btn save-btn submit_note submit_inline_note", id: "submit_note"
2020
= link_to "Cancel", "#", class: "btn hide-button"
2121
.options
2222
%h6.left Notify via email:

0 commit comments

Comments
 (0)