Get rid of new lines, tabs and beginning/trailing white space in link text, and if that leaves us with nothing, look at the title and alt attributes.