Bug 326082 Get phishing detection to cope with tags within link text

p=me r=neil sr=bienvenu
This commit is contained in:
bugzilla%arlen.demon.co.uk 2006-02-13 23:01:06 +00:00
parent 6e81dc3f47
commit f6480bf58c
2 changed files with 10 additions and 0 deletions

View File

@ -137,6 +137,11 @@ function isPhishingURL(aLinkNode, aSilentMode)
function misMatchedHostWithLinkText(aLinkNode, aHrefURL, aLinkTextURL)
{
var linkNodeText = gatherTextUnder(aLinkNode);
// gatherTextUnder puts a space between each piece of text it gathers,
// so strip the spaces out (see bug 326082 for details).
linkNodeText = linkNodeText.replace(/ /g, "");
// only worry about http and https urls
if (linkNodeText)
{

View File

@ -135,6 +135,11 @@ function isPhishingURL(aLinkNode, aSilentMode, aHref)
function misMatchedHostWithLinkText(aLinkNode, aHrefURL, aLinkTextURL)
{
var linkNodeText = gatherTextUnder(aLinkNode);
// gatherTextUnder puts a space between each piece of text it gathers,
// so strip the spaces out (see bug 326082 for details).
linkNodeText = linkNodeText.replace(/ /g, "");
// only worry about http and https urls
if (linkNodeText)
{