Skip to content

Commit

Permalink
fix: escape selector when getting label
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Jun 28, 2023
1 parent 08be5d9 commit 9ed1057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/plugins/input-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class InputLabel {
}

static getInputFromLabel = (labelElement) => {
return document.querySelector('#' + labelElement.getAttribute('for'))
return document.querySelector('#' + CSS.escape(labelElement.getAttribute('for')))
}

// Public
Expand Down

0 comments on commit 9ed1057

Please sign in to comment.