Regarding Filter HTML input option
You don't need any hook for this. Go to Configuration > Text formats (path may vary slightly, but it is available in versions 6 to 8) and simply add tags to the list: