tweaked HTML handling