second part of fix for #52519 - unescape text/x-moz-url URLs when they are dropped into bookmarks and history

r=law@netscape.com
a=ben@netscape.com
This commit is contained in:
alecf%netscape.com 2000-10-19 21:47:36 +00:00
parent d9c0ca3d7e
commit dd4f96c8d0

View File

@ -325,6 +325,15 @@ function DropOnTree ( event )
// we may need to synthesize a name (just use the URL)
checkNameHack = true;
// pull the (optional) name out of the URL
var space = sourceID.indexOf(" ");
if (space >= 0)
{
name = sourceID.substr(space+1);
sourceID = sourceID.substr(0, space);
sourceID = unescape(sourceID);
}
}
else if (bestFlavor.value == "text/unicode")
{
@ -339,13 +348,6 @@ function DropOnTree ( event )
continue;
}
// pull the (optional) name out of the URL
var space = sourceID.indexOf(" ");
if (space >= 0)
{
name = sourceID.substr(space+1);
sourceID = sourceID.substr(0, space);
}
dump(" Node #" + i + ": drop '" + sourceID + "'\n");
dump(" from container '" + parentID + "'\n");