Don't use the values returned by NS_MakeAbsURL to pass it to link handler, when

a mailto: url is clicked. This is because netlib doesn't understand mailto: urls yet.
This will be fixed the right way after NECKO lands
This commit is contained in:
radha%netscape.com 1999-07-04 23:48:06 +00:00
parent 32eddfe0b4
commit 59223b8a6c
2 changed files with 18 additions and 0 deletions

View File

@ -1239,6 +1239,15 @@ nsGenericElement::TriggerLink(nsIPresContext& aPresContext,
absURLSpec = aURLSpec;
}
// HACK HACK HACK. If the link clicked is a mailto: url just
// pass the aURLSpec. This is because, netlib doesn't recognize
// mailto: protocol. Note: This s'd go away after NECKO lands
PRInt32 offset = -1;
offset = aURLSpec.Find("mailto");
if (offset >= 0)
absURLSpec = aURLSpec;
// Now pass on absolute url to the click handler
if (aClick) {
handler->OnLinkClick(mContent, aVerb, absURLSpec.GetUnicode(), aTargetSpec.GetUnicode());

View File

@ -1239,6 +1239,15 @@ nsGenericElement::TriggerLink(nsIPresContext& aPresContext,
absURLSpec = aURLSpec;
}
// HACK HACK HACK. If the link clicked is a mailto: url just
// pass the aURLSpec. This is because, netlib doesn't recognize
// mailto: protocol. Note: This s'd go away after NECKO lands
PRInt32 offset = -1;
offset = aURLSpec.Find("mailto");
if (offset >= 0)
absURLSpec = aURLSpec;
// Now pass on absolute url to the click handler
if (aClick) {
handler->OnLinkClick(mContent, aVerb, absURLSpec.GetUnicode(), aTargetSpec.GetUnicode());