Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As part of #1950632: Create a FieldDefinitionInterface and use it for formatters and widgets, we want to decouple formatters from $field and $instance config entities to allow greater reuse. Which means, we also need to decouple the helper functions that they call from these variables. _text_sanitize() is one such function. There's no need to pass it an entire config entity when all it needs is a single setting.
Also, considering all the places in core that invoke it, I don't think we can pretend it's a private function, so renaming it.
Comment | File | Size | Author |
---|---|---|---|
text_sanitize.patch | 8.58 KB | effulgentsia | |
Comments
Comment #1
swentel CreditAttribution: swentel commentedLooks good to me.
Comment #2
yched CreditAttribution: yched commentedSame here :-)
Comment #3
webchickThis looks simple enough.
Committed and pushed to 8.x. Thanks!
Marking for change notice.
Comment #4
swentel CreditAttribution: swentel commentedCreated change notice: http://drupal.org/node/1975504
Comment #5
andypostLooks good.
Also filed #1975538: Remove $text_processing argument from text_sanitize() as follow-up to check that we can drop this atgument
Comment #6
star-szrTags.