Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ps_mainmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down