Commit beb5e1bd6b6656b7c4f412a72c02c3e72ec5253c

Authored by randx
1 parent adeeae9f

Sanitize glm helper

app/assets/stylesheets/sections/notes.scss
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 31
32 #new_note { 32 #new_note {
33 .note-text { 33 .note-text {
34 - height:25px; 34 + height:40px;
35 } 35 }
36 .attach_holder { 36 .attach_holder {
37 display:none; 37 display:none;
@@ -212,3 +212,8 @@ td .line_note_link { @@ -212,3 +212,8 @@ td .line_note_link {
212 } 212 }
213 } 213 }
214 } 214 }
  215 +
  216 +.note-text {
  217 + border: 1px solid #aaa;
  218 + box-shadow:none;
  219 +}
app/helpers/gitlab_markdown_helper.rb
@@ -31,7 +31,7 @@ module GitlabMarkdownHelper @@ -31,7 +31,7 @@ module GitlabMarkdownHelper
31 extractions[$1] 31 extractions[$1]
32 end 32 end
33 33
34 - text.html_safe 34 + sanitize text.html_safe
35 end 35 end
36 36
37 # Use this in places where you would normally use link_to(gfm(...), ...). 37 # Use this in places where you would normally use link_to(gfm(...), ...).
app/views/notes/_per_line_form.html.haml
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 = f.text_area :note, size: 255, class: 'line-note-text' 16 = f.text_area :note, size: 255, class: 'line-note-text'
17 .note_actions 17 .note_actions
18 .buttons 18 .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"
20 = link_to "Cancel", "#", class: "btn hide-button" 20 = link_to "Cancel", "#", class: "btn hide-button"
21 .options 21 .options
22 %h6.left Notify via email: 22 %h6.left Notify via email: