зеркало из https://github.com/mozilla/gecko-dev.git
Bug 467477 - View Source should linkify xlink:href. r=mrbkap
This commit is contained in:
Родитель
654d4b36b9
Коммит
7fc3cdc6a9
|
@ -948,6 +948,8 @@ PRBool CViewSourceHTML::IsUrlAttribute(const nsAString& tagName,
|
|||
|
||||
PRBool isHref = trimmedAttrName.LowerCaseEqualsLiteral("href");
|
||||
PRBool isSrc = !isHref && trimmedAttrName.LowerCaseEqualsLiteral("src");
|
||||
PRBool isXLink = !isHref && !isSrc &&
|
||||
mDocType == eXML && trimmedAttrName.EqualsLiteral("xlink:href");
|
||||
|
||||
// If this is the HREF attribute of a BASE element, then update the base URI.
|
||||
// This doesn't feel like the ideal place for this, but the alternatives don't
|
||||
|
@ -959,7 +961,7 @@ PRBool CViewSourceHTML::IsUrlAttribute(const nsAString& tagName,
|
|||
SetBaseURI(expandedBaseSpec);
|
||||
}
|
||||
|
||||
return isHref || isSrc;
|
||||
return isHref || isSrc || isXLink;
|
||||
}
|
||||
|
||||
void CViewSourceHTML::WriteHrefAttribute(nsTokenAllocator* allocator,
|
||||
|
|
Загрузка…
Ссылка в новой задаче