program define striphtml
	args var
	replace `var'=subinstr(`var',"&nbsp;"," ",.)
	gen old=""
	gen diff=1
	while (diff) {
		capture drop diff
		replace old=`var'
		replace `var'=subinstr(`var',substr(`var',strpos(`var',"<"),strpos(`var',">")-strpos(`var',"<")+1),"",1)
		egen diff=max(old!=`var')
	}
	drop old diff
end