Add two new methods to the $sanitizer API variable: $sanitizer->purify($html) runs any markup you give it through HTML Purifier. And $sanitizer->removeEntities($str) is the opposite of $sanitizer->entities() in that it removes entities rather than adds them.