diff --git a/ps_mainmenu.php b/ps_mainmenu.php index c3ddd9f..96fe7ef 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1359,6 +1359,14 @@ public function getAddLinkFieldsValues() $link['link'][$key] = Tools::htmlentitiesDecodeUTF8($label); } + // Decode the label as well, the same way the link is decoded above. getLinkLang() + // returns it HTML-entity encoded (Tools::safeOutput), so without this the edit form + // pre-fills with the encoded value and re-encodes it on every save, stacking the + // entities (e.g. "À" -> "À" -> "À" -> ...). + foreach ($link['label'] as $key => $label) { + $link['label'][$key] = Tools::htmlentitiesDecodeUTF8($label); + } + $links_label_edit = $link['link']; $labels_edit = $link['label']; $new_window_edit = $link['new_window'];