Commit fa17838ce0f90b37e134b80762b47567251449c5

Authored by Leandro Santos
1 parent 25a90c0e

should not escape notification message in admin notification plugin

plugins/admin_notifications/views/admin_notifications_plugin_public/notifications_with_popup.html.erb
@@ -9,12 +9,12 @@ @@ -9,12 +9,12 @@
9 </div> 9 </div>
10 </div> 10 </div>
11 <div class="notification-message notification-with-title-message"> 11 <div class="notification-message notification-with-title-message">
12 - <%= AdminNotificationsPlugin::NotificationHelper.substitute_variables(notification.message, current_user) %> 12 + <%= AdminNotificationsPlugin::NotificationHelper.substitute_variables(notification.message, current_user).html_safe %>
13 </div> 13 </div>
14 <% else %> 14 <% else %>
15 <div class="<%= notification.type.gsub("AdminNotificationsPlugin::", "").downcase %> notification notification-without-title" data-notification="<%=notification.id%>"> 15 <div class="<%= notification.type.gsub("AdminNotificationsPlugin::", "").downcase %> notification notification-without-title" data-notification="<%=notification.id%>">
16 <div class="notification-message"> 16 <div class="notification-message">
17 - <%= AdminNotificationsPlugin::NotificationHelper.substitute_variables(notification.message, current_user) %> 17 + <%= AdminNotificationsPlugin::NotificationHelper.substitute_variables(notification.message, current_user).html_safe %>
18 </div> 18 </div>
19 </div> 19 </div>
20 <% end %> 20 <% end %>
plugins/admin_notifications/views/shared/_notifications_list.html.erb
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <% @notifications.each do |notification| %> 23 <% @notifications.each do |notification| %>
24 <div class="notification-line"> 24 <div class="notification-line">
25 <div class="notification-message"> 25 <div class="notification-message">
26 - <%= truncate(notification.message, length: 50) %> 26 + <%= truncate(notification.message.html_safe, length: 50) %>
27 </div> 27 </div>
28 <div class="notification-action"> 28 <div class="notification-action">
29 <% if notification.active? %> 29 <% if notification.active? %>