зеркало из https://github.com/mozilla/pjs.git
Bug 467477 - View Source should linkify xlink:href. r=mrbkap
This commit is contained in:
Родитель
c6ad4c67a2
Коммит
2513ec59bf
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче