Skip to content

Commit 1e64885

Browse files
Add a note for whitelisted tags by default in the TargetScrubber (#110)
* add a note for whitelisted tags by default in the TargetScrubber * reword the whitelisted to permitted Co-authored-by: Kasper Timm Hansen <[email protected]> * added the permitted tag list to the README Co-authored-by: Kasper Timm Hansen <[email protected]>
1 parent 51dc564 commit 1e64885

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ html_fragment.to_s # => "<a></a>"
8181
#### `Rails::Html::TargetScrubber`
8282

8383
Where `PermitScrubber` picks out tags and attributes to permit in sanitization,
84-
`Rails::Html::TargetScrubber` targets them for removal.
84+
`Rails::Html::TargetScrubber` targets them for removal. See https://github.com/flavorjones/loofah/blob/main/lib/loofah/html5/safelist.rb for the tag list.
8585

86+
**Note:** by default, it will scrub anything that is not part of the permitted tags from
87+
loofah `HTML5::Scrub.allowed_element?`.
8688

8789
```ruby
8890
scrubber = Rails::Html::TargetScrubber.new

0 commit comments

Comments
 (0)