Manual:HtmlArmor.php

HtmlArmor is a small utility class for situations where you want to accept a parameter of text that is normally escaped, but in some cases needs to accept raw HTML.

Usage
In the above example, the $ parameter can either be a to-be-escaped string, or an HtmlArmor object that should remain the same. The  function will take care of the escaping for you, providing you with content you know that is safe HTML.