MtxOption does not render & symbol
Closed this issue · 4 comments
Keolan-MFOL commented
Thanks for the repository
When using mtx-option in the mtx-select, the & symbol renders as '&'
This seems to only affect the & symbol as other symbols render as expected.
I suspect the issue is caused in line 543 of select.ts using the innerHTML as the value for the label
line 543: $ngOptionLabel: option.elementRef.nativeElement.innerHTML,
HTML
<mat-form-field>
<mat-label>Choose an option</mat-label>
<mtx-select>
@for (food of items; track food) {
<mtx-option [value]="food.id">
{{food.name}}
</mtx-option>
}
</mtx-select>
</mat-form-field>
TS
items = [
{ id: 1, name: 'Apple &🎅' },
{ id: 2, name: 'Lemon &🕵️♀️' },
{ id: 3, name: 'Lime !@#$%^&*()-=' },
{ id: 4, name: 'Orange' },
{ id: 5, name: 'Strawberry' },
];
nzbin commented
Keolan-MFOL commented
I've recreated the issue in stackblitz
nzbin commented
18.2.2 has fixed, please have a try.
Keolan-MFOL commented
The issue has been resolved in 18.2.2. Thank you.