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.
SafeMarkup::checkPlain() always escapes and sets safe. SafeMarkup::escape() only escapes if the string if not already marked as safe. This is causing confusion. At least, the functions need to be better documented.
This is plenty of discussion about this #2506195: Remove SafeMarkup::set() from Xss::filter()
Comments
Comment #1
alexpottComment #2
joelpittetSafeMarkup::escape doesn't exist any more. Closing as duplicate.