the html was not wrapped in SafeMarkup::set hence the issue.