fixed isHtml method in controller