Merge pull request #17152 from FHenry/dev_fix_quote_in_button_name
fix: JS error in page.js when the is a quote in button translation
This commit is contained in:
commit
4dc8d0fb44
2 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ const test_button_names = [
|
|||
"Porcupine Tree (the GOAT)",
|
||||
"AC / DC",
|
||||
`Electronic Dance "music"`,
|
||||
"l'imperatrice",
|
||||
];
|
||||
|
||||
const add_button = (label, group = "TestGroup") => {
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ frappe.ui.Page = class Page {
|
|||
|
||||
if (!label || !parent) return false;
|
||||
|
||||
const item_selector = `${selector}[data-label='${encodeURIComponent(label)}']`;
|
||||
const item_selector = `${selector}[data-label="${encodeURIComponent(label)}"]`;
|
||||
|
||||
const existing_items = $(parent).find(item_selector);
|
||||
return existing_items?.length > 0 && existing_items;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue