html_encode(undefined) should return empty string

Exception made for custom formatting function