Skip to content

Commit

Permalink
feat: only allow checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfran committed Apr 25, 2024
1 parent 29e29a1 commit b95adc9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/js/angular-sanitize.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,14 @@ function $SanitizeProvider() {
if (!ignoreCurrentElement && blockedElements[tag]) {
ignoreCurrentElement = tag;
}
const validCheckbox = validElements['input'] && validAttrs['checked'];

if (validCheckbox) {
if (tag === 'input' && attrs.type !== 'checkbox') {
return;
}
}

if (!ignoreCurrentElement && validElements[tag] === true) {
out('<');
out(tag);
Expand Down

0 comments on commit b95adc9

Please sign in to comment.