Convert HTMLPurifier safe HTML format