Skip to content

Commit

Permalink
fix: update regular expression pattern for input name postfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ccailly committed May 22, 2024
1 parent b1aac3f commit 53cf4bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/form_editor_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class GlpiFormEditorController

// Update input name
let postfix = "";
const postfix_pattern = new RegExp('\[([\w-\[\]]*)\]$', 'g');
const postfix_pattern = new RegExp(/\[([\w-[\]]*)\]$/, 'g');
if (typeof field === 'string' && postfix_pattern.test(field)) {
postfix = field.match(postfix_pattern);
field = field.replace(postfix, "");
Expand Down

0 comments on commit 53cf4bd

Please sign in to comment.