mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1094449. Treat @rel on anchors as a set of space-separated tokens, not a single token. r=smaug
This commit is contained in:
parent
7711f28da3
commit
d0a90742ba
@ -13189,12 +13189,15 @@ nsDocShell::OnLinkClickSync(nsIContent *aContent,
|
||||
uint32_t flags = INTERNAL_LOAD_FLAGS_NONE;
|
||||
if (IsElementAnchor(aContent)) {
|
||||
MOZ_ASSERT(aContent->IsHTML());
|
||||
if (aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::rel,
|
||||
NS_LITERAL_STRING("noreferrer"),
|
||||
aContent->IsInHTMLDocument() ?
|
||||
eIgnoreCase : eCaseMatters)) {
|
||||
nsAutoString referrer;
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rel, referrer);
|
||||
nsWhitespaceTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tok(referrer);
|
||||
while (tok.hasMoreTokens()) {
|
||||
if (tok.nextToken().LowerCaseEqualsLiteral("noreferrer")) {
|
||||
flags |= INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER |
|
||||
INTERNAL_LOAD_FLAGS_NO_OPENER;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body onload="window.parent.onloadCount++">
|
||||
<a href="bug530396-noref.sjs" rel="noreferrer" id="target1">bug530396-noref.sjs</a>
|
||||
<a href="bug530396-noref.sjs?newwindow" rel="noreferrer" id="target2" target="newwindow">bug530396-noref.sjs with new window</a>
|
||||
<a href="bug530396-noref.sjs" rel="noreferrer foo" id="target1">bug530396-noref.sjs</a>
|
||||
<a href="bug530396-noref.sjs?newwindow" rel="nofollow noreferrer" id="target2" target="newwindow">bug530396-noref.sjs with new window</a>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user