Better html detection