bs4.NavigableString.format_string

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

Format the given string using the given formatter.