I don't know any extension that currently has this feature, but I think that there should definitely be one.
The way it would work is that it would add a new BBCode tag such as [HTML]
and content inside that tag will be treated as an HTML code.
This extension would need to also blacklist the use of certain tags (which could be configured), because then it could be easily abused (for example, a <script>
tag with custom JavaScript could harm everyone who views the page). Because of this, I think that it shouldn't be a core feature, but rather an extension, that would bring more functionality to your forum, and could also be used in iPurpl3x's case.
According to s9e\TextFormatter's "safe HTML", it is possible and I think that many would welcome such extension