Skip to content

Commit

Permalink
Make notification description support HTML element
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Winbobob committed Aug 8, 2019
1 parent fbef3bd commit 783cbf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/controllers/notifications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def edit; end

# POST /notifications
def create
if params[:notification] && (warn_for_special_chars(params[:notification][:subject], "Subject") ||
warn_for_special_chars(params[:notification][:description], "Description"))
if params[:notification]
redirect_back
return
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/shared/_flash_notifications.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<table style="width: 100%">
<tbody class="flash_notification alert alert-success">
<tr style="border-style: none none solid none; border-width: 1px;">
<td><b><%= notification.subject.upcase %></b></td>
<td><b><%= sanitize notification.subject.upcase %></b></td>
<td><%= link_to image_tag("/assets/tree_view/delete-icon-24.png", border: 0, height: '16', width: '16', align: 'right'), track_notifications_path(id: notification.id), {class: 'dock-item'} %> </td>
</tr>
<tr><td><%= notification.description %></td><td></td></tr>
<tr><td><%= sanitize notification.description.html_safe %></td><td></td></tr>
</tbody>
</table>
<% end %>
Expand Down

0 comments on commit 783cbf9

Please sign in to comment.