Fix hang when saving pages with non-ASCII characters in URLs. b=191965 r=adamlock sr=bzbarsky a=asa

This commit is contained in:
dbaron%dbaron.org 2003-02-11 20:28:44 +00:00
Родитель faba98289a
Коммит 383248a0c7
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -2865,7 +2865,7 @@ nsWebBrowserPersist::StoreURIAttribute(
attrNode->GetNodeValue(oldValue);
if (!oldValue.IsEmpty())
{
nsCAutoString oldCValue; oldCValue.AssignWithConversion(oldValue);
NS_ConvertUCS2toUTF8 oldCValue(oldValue);
return StoreURI(oldCValue.get(), aNeedsPersisting, aData);
}
}
@ -2995,7 +2995,7 @@ nsWebBrowserPersist::FixupAnchor(nsIDOMNode *aNode)
{
nsString oldValue;
attrNode->GetNodeValue(oldValue);
nsCString oldCValue; oldCValue.AssignWithConversion(oldValue);
NS_ConvertUCS2toUTF8 oldCValue(oldValue);
// Skip empty values and self-referencing bookmarks
if (oldCValue.IsEmpty() || oldCValue.CharAt(0) == '#')