diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 6ca8f86a427..3f8740b3daf 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -1623,9 +1623,9 @@ nsContentUtils::GetNodeInfoFromQName(const nsAString& aNamespaceURI, const PRUnichar* end; qName.EndReading(end); - nsCOMPtr prefix = do_GetAtom(Substring(colon + 1, end)); + nsCOMPtr prefix = do_GetAtom(Substring(qName.get(), colon)); - rv = aNodeInfoManager->GetNodeInfo(Substring(qName.get(), colon), prefix, + rv = aNodeInfoManager->GetNodeInfo(Substring(colon + 1, end), prefix, aNamespaceURI, aNodeInfo); } else {