Fix for bug 824638 - Add-on keeps getting "TypeError: node.href is undefined" for an <a> containing an <img>

There are two commits here: this first commit is the one that fixes this bug, and is the main one to review. While updating it I noticed that this file uses two spaces after a period, which is inconsistent with all the other docs. The second commit fixes that.