improving clean html function