diff --git a/parser/htmlparser/src/nsViewSourceHTML.cpp b/parser/htmlparser/src/nsViewSourceHTML.cpp index b9a4be2b3663..5f905994c511 100644 --- a/parser/htmlparser/src/nsViewSourceHTML.cpp +++ b/parser/htmlparser/src/nsViewSourceHTML.cpp @@ -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,