Bug 520361 - escapeNameValuePair() shouldn't be global. r=gavin

This commit is contained in:
Dão Gottwald 2009-10-03 18:41:44 +02:00
parent 4c5bea8fa8
commit 9e56adade4

View File

@ -5749,14 +5749,6 @@ function BrowserOpenAddonsMgr(aPane)
window.openDialog(EMURL, "", EMFEATURES);
}
function escapeNameValuePair(aName, aValue, aIsFormUrlEncoded)
{
if (aIsFormUrlEncoded)
return escape(aName + "=" + aValue);
else
return escape(aName) + "=" + escape(aValue);
}
function AddKeywordForSearchField()
{
var node = document.popupNode;
@ -5784,6 +5776,13 @@ function AddKeywordForSearchField()
var el, type;
var formData = [];
function escapeNameValuePair(aName, aValue, aIsFormUrlEncoded) {
if (aIsFormUrlEncoded)
return escape(aName + "=" + aValue);
else
return escape(aName) + "=" + escape(aValue);
}
for (var i=0; i < node.form.elements.length; i++) {
el = node.form.elements[i];