how to use htmlawed function?

htmlawed will work when i save some thing (blog, file, etc)

 

but i want to get html source from other site - i use file_get_contents() - ,  and put it on sidebar

1.get html code from xxxxxxxx.com

2.use htmlawed

3.put on sidebar

How to do it ?