From 28f3161bf88c4a7f8531a7d90b1d27ccac6f272d Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 13 Nov 2023 15:54:22 +1100 Subject: [PATCH] Removing `raw` from invoice template --- .../spree/admin/orders/_invoice/_line_item_name.html.haml | 6 +++--- app/views/spree/admin/orders/_invoice_table.html.haml | 4 ++-- app/views/spree/admin/orders/_invoice_table2.html.haml | 4 ++-- app/views/spree/admin/orders/_invoice_table4.html.haml | 4 ++-- app/views/spree/order_mailer/_order_summary.html.haml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) 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