Skip to content

Improve content sanitiser#16

Merged
tardinha merged 21 commits intomasterfrom
improve-content-sanitiser
Nov 14, 2025
Merged

Improve content sanitiser#16
tardinha merged 21 commits intomasterfrom
improve-content-sanitiser

Conversation

@JamesDPC
Copy link
Contributor

Changes

  • Update config: default_allowed_html_tags is now an array
  • Remove: getAllowedHTMLTagsAsArray()
  • Config: removeFormatPasted is now false (the default)
  • Config: resetCss is now false (the default)
  • Remove h2 from default tagsToRemove configuration
  • Move script loading to a dedicated JS, loading options from a data attribute
  • Support CSS.AllowedProperties in santiser, allow configuration to set allowed CSS properties - empty by default
  • Allow configuration to set default allowed attributes -empty by default
  • Remove tagsToKeep, and use default_allowed_html_tags as source for that Trumbowyg options
  • Support custom fields adding Trumbowyg plugins
  • Handle empty value to avoid unnecessary operation on empty string
  • Update documentation
  • Update tests

@JamesDPC JamesDPC self-assigned this Nov 12, 2025
@JamesDPC JamesDPC marked this pull request as ready for review November 14, 2025 02:06
@JamesDPC JamesDPC requested a review from tardinha November 14, 2025 02:06
@tardinha tardinha merged commit e015a80 into master Nov 14, 2025
2 checks passed
@tardinha tardinha deleted the improve-content-sanitiser branch November 14, 2025 03:05
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.

2 participants