Bug 467477 - View Source should linkify xlink:href. r=mrbkap

This commit is contained in:
Robert Longson 2009-12-12 14:37:22 +00:00
Родитель c6ad4c67a2
Коммит 2513ec59bf
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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,