some background on this function. I think it was originally made so that we could fed it the innerHTML of a contenteditable. However, it never was called like that.

see https://github.com/mozilla-b2g/gaia/pull/13527#discussion_r7620180 (open the outdated diff) for more information on how it's called in Messaging app.