Fix #13272 - missing 'ng-bind'

This PR fixes issue #13272 where supplier and product names containing HTML character entities (e.g. ã) were rendered as raw text on the /admin/inventory page.

For example, a supplier name intended to appear as:

Pãtes du Contentin

would incorrectly display as:

Pãtes du Contentin

Cause:
AngularJS’s {{ ... }} interpolation inserts raw strings into the DOM without decoding HTML entities.
This commit is contained in:
Jordan Mock
2025-04-23 14:05:21 +01:00
committed by GitHub
parent 6a9493a581
commit c14c760033

View File

@@ -15,9 +15,9 @@
.exchange-product{'ng-repeat' => 'product in enterprises[exchange.enterprise_id].supplied_products | filter:visibleProducts:exchange:order_cycle.visible_variants_for_outgoing_exchanges' }
.exchange-product-details
%label
%img{'ng-src' => '{{ product.image_url }}'}
.name {{ product.name }}
.supplier {{ product.supplier_name }}
%img{'ng-src' => '{{ product.image_url }}'}
.name {{ 'ng-bind' => product.name }}
.supplier {{ 'ng-bind' => product.supplier_name }}
.exchange-product-variant{'ng-repeat' => 'variant in product.variants | visibleVariants:exchange:order_cycle.visible_variants_for_outgoing_exchanges | filter:variantSuppliedToOrderCycle as filteredVariants'}
%label