diff --git a/app/helpers/spree/admin/navigation_helper.rb b/app/helpers/spree/admin/navigation_helper.rb index dcdf00a2e7..d39ac5b3cc 100644 --- a/app/helpers/spree/admin/navigation_helper.rb +++ b/app/helpers/spree/admin/navigation_helper.rb @@ -133,7 +133,7 @@ module Spree if html_options[:icon] html_options[:class] += " #{html_options[:icon]}" end - link_to(text_for_button_link(text, html_options), url, html_options) + link_to(text, url, html_options) end end diff --git a/app/views/producer_mailer/order_cycle_report.html.haml b/app/views/producer_mailer/order_cycle_report.html.haml index e24d37fc1a..c44742a4b1 100644 --- a/app/views/producer_mailer/order_cycle_report.html.haml +++ b/app/views/producer_mailer/order_cycle_report.html.haml @@ -37,20 +37,20 @@ - @grouped_line_items.each_pair do |product_and_full_name, line_items| %tr %td - #{line_items.first.variant.sku} + = line_items.first.variant.sku - if @distributors_pickup_times.many? %td - #{raw(line_items.first.product.supplier.name)} + = line_items.first.product.supplier.name %td - #{raw(product_and_full_name)} + = product_and_full_name %td.text-right - #{line_items.sum(&:quantity)} + = line_items.sum(&:quantity) %td.text-right - #{line_items.first.single_money} + = line_items.first.single_money %td.text-right - #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency) } + = Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency) %td.tax.text-right - #{Spree::Money.new(line_items.sum(&:included_tax), currency: line_items.first.currency) } + = Spree::Money.new(line_items.sum(&:included_tax), currency: line_items.first.currency) %tr.total-row %td - if @distributors_pickup_times.many? @@ -59,9 +59,9 @@ %td %td %td.text-right - #{@total} + = @total %td.text-right - #{@tax_total} + = @tax_total - if @customer_line_items %p = t :producer_mail_order_customer_text @@ -85,33 +85,34 @@ - @customer_line_items.each do |line_item| %tr %td - #{line_item[:sku]} + = line_item[:sku] - if @distributors_pickup_times.many? %td - #{raw(line_item[:supplier_name])} + = line_item[:supplier_name] %td - #{raw(line_item[:product_and_full_name])} + = line_item[:product_and_full_name] %td.text-right - #{line_item[:quantity]} + = line_item[:quantity] %td - #{raw(line_item[:first_name])} + = line_item[:first_name] %td - #{raw(line_item[:last_name])} + = line_item[:last_name] %p = t :producer_mail_text_after %p - #{t(:producer_mail_signoff)}, + = t(:producer_mail_signoff) + , %em %p - #{@coordinator.name} + = @coordinator.name %p %br - #{@coordinator.address.address1} + = @coordinator.address.address1 %br - #{@coordinator.address.city} + = @coordinator.address.city %br - #{@coordinator.address.zipcode} + = @coordinator.address.zipcode %p - #{@coordinator.phone} + = @coordinator.phone %p - #{@coordinator.contact.email} + = @coordinator.contact.email diff --git a/app/views/shared/_page_alert.html.haml b/app/views/shared/_page_alert.html.haml index d57ef18d99..b13a0710fa 100644 --- a/app/views/shared/_page_alert.html.haml +++ b/app/views/shared/_page_alert.html.haml @@ -1,6 +1,6 @@ - if ContentConfig.home_page_alert_html.present? .alert-cta - %h6= raw ContentConfig.home_page_alert_html + %h6= sanitize(ContentConfig.home_page_alert_html, scrubber: TrixScrubber.new) - else = render "shared/register_call" diff --git a/app/views/spree/admin/orders/_invoice/_line_item_name.html.haml b/app/views/spree/admin/orders/_invoice/_line_item_name.html.haml index 015f48a54d..37dc28e3a1 100644 --- a/app/views/spree/admin/orders/_invoice/_line_item_name.html.haml +++ b/app/views/spree/admin/orders/_invoice/_line_item_name.html.haml @@ -1,6 +1,6 @@ %h5.inline-header - = "#{raw(line_item.variant.product.name)}" + = line_item.variant.product.name - unless line_item.variant.product.name.include? line_item.name_to_display - %span= "- #{raw(line_item.name_to_display)}" + %span= "- #{line_item.name_to_display}" - if line_item.unit_price_price_and_unit - = raw("(#{line_item.unit_price_price_and_unit})") \ No newline at end of file + = raw("(#{line_item.unit_price_price_and_unit})") diff --git a/app/views/spree/admin/orders/_invoice_table.html.haml b/app/views/spree/admin/orders/_invoice_table.html.haml index 7ed12adca1..04ac30e81a 100644 --- a/app/views/spree/admin/orders/_invoice_table.html.haml +++ b/app/views/spree/admin/orders/_invoice_table.html.haml @@ -16,7 +16,7 @@ = render 'spree/shared/line_item_name', line_item: item %br %small - %em= raw(item.variant.product.supplier.name) + %em= item.variant.product.supplier.name %td{:align => "right"} = item.quantity %td{:align => "right"} @@ -28,7 +28,7 @@ - taxable = adjustment.adjustable_type == "Spree::Shipment" ? adjustment.adjustable : adjustment %tr %td - %strong= "#{raw(adjustment.label)}" + %strong= adjustment.label %td{:align => "right"} 1 %td{:align => "right"} diff --git a/app/views/spree/admin/orders/_invoice_table2.html.haml b/app/views/spree/admin/orders/_invoice_table2.html.haml index ff24582867..789737bdad 100644 --- a/app/views/spree/admin/orders/_invoice_table2.html.haml +++ b/app/views/spree/admin/orders/_invoice_table2.html.haml @@ -19,7 +19,7 @@ = render 'spree/shared/line_item_name', line_item: item %br %small - %em= raw(item.variant.product.supplier.name) + %em= item.variant.product.supplier.name %td{:align => "right"} = item.quantity %td{:align => "right"} @@ -33,7 +33,7 @@ - checkout_adjustments_for(@order, exclude: [:line_item]).reverse_each do |adjustment| %tr %td - %strong= "#{raw(adjustment.label)}" + %strong= adjustment.label %td{:align => "right"} %td{:align => "right"} %td{:align => "right"} diff --git a/app/views/spree/admin/orders/_invoice_table4.html.haml b/app/views/spree/admin/orders/_invoice_table4.html.haml index 82a7c57d28..a19f7aa20c 100644 --- a/app/views/spree/admin/orders/_invoice_table4.html.haml +++ b/app/views/spree/admin/orders/_invoice_table4.html.haml @@ -22,7 +22,7 @@ = render 'spree/admin/orders/_invoice/line_item_name', line_item: item %br %small - %em= raw(item.variant.product.supplier.name) + %em= item.variant.product.supplier.name %td{:align => "right"} = item.quantity %td{:align => "right"} @@ -51,7 +51,7 @@ - @order.checkout_adjustments(exclude: [:line_item, :shipment]).reverse_each do |adjustment| %tr %td - %strong= "#{raw(adjustment.label)}" + %strong= adjustment.label %td{:align => "right"} %td{:align => "right"} %td{:align => "right"} diff --git a/app/views/spree/order_mailer/_order_summary.html.haml b/app/views/spree/order_mailer/_order_summary.html.haml index af0ba5433a..55e0e67cc3 100644 --- a/app/views/spree/order_mailer/_order_summary.html.haml +++ b/app/views/spree/order_mailer/_order_summary.html.haml @@ -20,7 +20,7 @@ = render 'spree/shared/line_item_name', line_item: item %br %small - %em= raw(item.variant.product.supplier.name) + %em= item.variant.product.supplier.name %td - if item.variant.sku.blank? \- @@ -43,7 +43,7 @@ - checkout_adjustments_for(@order, exclude: [:line_item]).reverse_each do |adjustment| %tr %td{align: "right", colspan: "3"} - = "#{raw(adjustment.label)}:" + = "#{adjustment.label}:" %td{align: "right"} = adjustment.display_amount %tr diff --git a/app/views/spree/shared/_line_item_name.html.haml b/app/views/spree/shared/_line_item_name.html.haml index 12a32772a4..8b1e75de55 100644 --- a/app/views/spree/shared/_line_item_name.html.haml +++ b/app/views/spree/shared/_line_item_name.html.haml @@ -1,6 +1,6 @@ %h5.inline-header - = "#{raw(line_item.product.name)}" + = "#{line_item.product.name}" - unless line_item.product.name.include? line_item.name_to_display - %span= "- #{raw(line_item.name_to_display)}" + %span= "- #{line_item.name_to_display}" - if line_item.options_text - = "(#{raw(line_item.options_text)})" + = "(#{line_item.options_text})"