If we were to add APIs here, they may be span-based instead, e.g. something like #40603 (comment). Using spans for these APIs is not developer-friendly in my opinion, since it's not clear what is the ...
Converts a string to an HTML-encoded string.