From c0535cb4308a40f30966f60ac9493b860c4a11ad Mon Sep 17 00:00:00 2001 From: Ray Papworth Date: Tue, 1 Oct 2024 12:45:29 +0000 Subject: [PATCH 1/2] use unique identifier for character pickers --- pinc/CharacterSelector.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinc/CharacterSelector.inc b/pinc/CharacterSelector.inc index d9336fefa..55de10860 100644 --- a/pinc/CharacterSelector.inc +++ b/pinc/CharacterSelector.inc @@ -33,7 +33,7 @@ class CharacterSelector } foreach ($picker_set->get_subsets() as $code => $picker) { - $safe_code = bin2hex($code); + $safe_code = uniqid(); $title = $prefix . $picker_set->get_title($code); $selector_string .= ""; $row_string .= "
\n"; From cf8b1d4860fb895d735ce3c4092edb5608d515fc Mon Sep 17 00:00:00 2001 From: Ray Papworth Date: Tue, 1 Oct 2024 15:18:16 +0000 Subject: [PATCH 2/2] use serial number for picker id --- pinc/CharacterSelector.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pinc/CharacterSelector.inc b/pinc/CharacterSelector.inc index 55de10860..daafc20b6 100644 --- a/pinc/CharacterSelector.inc +++ b/pinc/CharacterSelector.inc @@ -21,6 +21,7 @@ class CharacterSelector $selector_string = "
"; $row_string = ""; + $pickerid = 1; foreach ($this->picker_sets as $picker_set) { if (!$picker_set) { continue; @@ -33,10 +34,11 @@ class CharacterSelector } foreach ($picker_set->get_subsets() as $code => $picker) { - $safe_code = uniqid(); + $safe_code = "picker_$pickerid"; + $pickerid++; $title = $prefix . $picker_set->get_title($code); - $selector_string .= ""; - $row_string .= "
\n"; + $selector_string .= ""; + $row_string .= "
\n"; foreach ($picker as $row) { $row_string .= $this->draw_row(convert_codepoint_ranges_to_characters($row)); }