Fix html tag attribute handling when no tag present