|
|
@@ -156,9 +156,13 @@ class Studiou_WC_FPP_Single_Product {
|
|
|
if ($attr_value === '') {
|
|
|
continue;
|
|
|
}
|
|
|
- $taxonomy = str_replace('attribute_', '', $attr_name);
|
|
|
- $term = taxonomy_exists($taxonomy) ? get_term_by('slug', $attr_value, $taxonomy) : null;
|
|
|
- $label_parts[] = $term ? $term->name : $attr_value;
|
|
|
+ $taxonomy = str_replace('attribute_', '', $attr_name);
|
|
|
+ $term = taxonomy_exists($taxonomy) ? get_term_by('slug', $attr_value, $taxonomy) : null;
|
|
|
+ // Term names or non-tax values may carry HTML entities ( , K,
|
|
|
+ // á, …) pasted in by admins. <option> text is literal, so entities
|
|
|
+ // would render as-is. Decode before handing to JS.
|
|
|
+ $raw = $term ? $term->name : urldecode((string) $attr_value);
|
|
|
+ $label_parts[] = html_entity_decode($raw, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
|
|
}
|
|
|
$tiers = class_exists('Studiou_WC_FPP_Pricing')
|
|
|
? Studiou_WC_FPP_Pricing::get_tiers($variation_id)
|