Hi,
Thats great!
Yes you add this function in the .tpl file or common .php file to make it global or the other thing you can do is remove htmlentities() function form the file through which the data is being instered in the database the you will not have to decode html entities while showing the output.
Cheers!
~Maneet
LeXolution IT Services
Web Development Company