Skip to content

Fix runtime errors in TagAndAttributeRemover and PayloadSanitizer#1

Open
burak-sevinc wants to merge 3 commits intoreformo:mainfrom
burak-sevinc:hotfix/missing-allowed-tags
Open

Fix runtime errors in TagAndAttributeRemover and PayloadSanitizer#1
burak-sevinc wants to merge 3 commits intoreformo:mainfrom
burak-sevinc:hotfix/missing-allowed-tags

Conversation

@burak-sevinc
Copy link

Changes:

  • Fixed an undefined array key error in PayloadSanitizer that occurred when <img> or other tags were missing from the allowedTags list but present in the input.
  • Resolved an issue where in_array would throw an error if allowedTagsAndAttributes was empty.
  • Added comprehensive handling for cases where allowedTags or allowedTagsAndAttributes are empty.

Tests:

  • Added a new test case to validate behavior when allowedTags and allowedTagsAndAttributes are empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant