[FIX] website: special character ok in menu label
Edit a website menu label with:
& < > " ` '
This is what is shown after saving:
& < > " ` '
This is happening since ea4dbcd240: characters &, <, >, ", `, and ' are
now always escaped. Before that commit, only < and > where escaped and
only when an image was inside the label.
With this change, we unescape the label when we are editing a menu.
opw-2609413
closes odoo/odoo#74558
X-original-commit: ab77054987287444c5f6141b047a63bab4b67baa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -692,7 +692,7 @@ var EditMenuDialog = weWidgets.Dialog.extend({
|
||||
var newMenu = {
|
||||
'fields': {
|
||||
'id': _.uniqueId('new-'),
|
||||
'name': link.content,
|
||||
'name': _.unescape(link.content),
|
||||
'url': link.url,
|
||||
'new_window': link.isNewWindow,
|
||||
'is_mega_menu': menuType === 'mega',
|
||||
@@ -738,7 +738,7 @@ var EditMenuDialog = weWidgets.Dialog.extend({
|
||||
}, menu.fields));
|
||||
dialog.on('save', this, link => {
|
||||
_.extend(menu.fields, {
|
||||
'name': link.content,
|
||||
'name': _.unescape(link.content),
|
||||
'url': link.url,
|
||||
'new_window': link.isNewWindow,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user