Skip to content

Commit

Permalink
Merge pull request #206 from taigaio/feat/allow-checkbox
Browse files Browse the repository at this point in the history
feat: only allow checkbox
  • Loading branch information
CarlosLVar authored Apr 25, 2024
2 parents c70efbd + b95adc9 commit a1cbbaf
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 a1cbbaf

Please sign in to comment.