consider href and src attributes correctly