bs4.Tag.format_string

Tag.format_string(s, formatter='minimal')

Format the given string using the given formatter.