Skip to content

Commit

Permalink
luci-base: fix createChoiceElement regex to catch closing tags with !
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Donald <[email protected]>
  • Loading branch information
systemcrash committed Jan 11, 2025
1 parent abaa26a commit 2520588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/luci-base/htdocs/luci-static/resources/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ const UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
let markup = null;

if (tpl)
markup = (tpl.textContent ?? tpl.innerHTML ?? tpl.firstChild.data).replace(/^<!--|-->$/, '').trim();
markup = (tpl.textContent ?? tpl.innerHTML ?? tpl.firstChild.data).replace(/^<!--|--!?>$/g, '').trim();
else
markup = '<li data-value="{{value}}"><span data-label-placeholder="true" /></li>';

Expand Down

0 comments on commit 2520588

Please sign in to comment.