bug 225695 : replacing incorrectly used escape/unescape() with en/decodeURI(Component). 3rd installment (for Venkman) (r=rgina, sr,a=brendan)

This commit is contained in:
jshin%mailaps.org 2003-12-05 06:12:59 +00:00
Родитель f9ab1db0c2
Коммит a9608a3472
5 изменённых файлов: 12 добавлений и 10 удалений

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

@ -1190,10 +1190,10 @@ function BreakInstance (parentBP, scriptWrapper, pc)
BreakInstance.prototype.__defineGetter__ ("jsdURL", bi_getURL);
function bi_getURL ()
{
return ("x-jsd:break?url=" + escape(this.url) +
return ("x-jsd:break?url=" + encodeURIComponent(this.url) +
"&lineNumber=" + this.lineNumber +
"&conditionEnabled=" + this.conditionEnabled +
"&condition=" + escape(this.condition) +
"&condition=" + encodeURIComponent(this.condition) +
"&passExceptions=" + this.passExceptions +
"&logResult=" + this.logResult +
"&resultAction=" + this.resultAction +
@ -1384,10 +1384,10 @@ function FutureBreakpoint (url, lineNumber)
FutureBreakpoint.prototype.__defineGetter__ ("jsdURL", fb_getURL);
function fb_getURL ()
{
return ("x-jsd:fbreak?url=" + escape(this.url) +
return ("x-jsd:fbreak?url=" + encodeURIComponent(this.url) +
"&lineNumber=" + this.lineNumber +
"&conditionEnabled=" + this.conditionEnabled +
"&condition=" + escape(this.condition) +
"&condition=" + encodeURIComponent(this.condition) +
"&passExceptions=" + this.passExceptions +
"&logResult=" + this.logResult +
"&resultAction=" + this.resultAction +

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

@ -112,10 +112,10 @@ function parseJSDURL (url)
ary = assignment.match(/(.+)=(.*)/);
if (ASSERT(ary, "error parsing ``" + assignment + "'' from " + url))
{
var name = unescape(ary[1]);
var name = decodeURIComponent(ary[1]);
/* only set the property the first time we see it */
if (2 in ary && !(name in parseResult))
parseResult[name] = unescape(ary[2]);
parseResult[name] = decodeURIComponent(ary[2]);
}
ary = rest.match(/([^&#]+)/);
}

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

@ -477,7 +477,7 @@ function ScriptRecord(scriptWrapper)
this.scriptWrapper = scriptWrapper;
this.jsdurl = "jsd:sourcetext?url=" +
escape(this.scriptWrapper.jsdScript.fileName) +
encodeURIComponent(this.scriptWrapper.jsdScript.fileName) +
"&base=" + this.baseLineNumber + "&extent=" + this.lineExtent +
"&name=" + this.functionName;
}

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

@ -945,14 +945,16 @@ function SourceText (scriptInstance)
{
this.scriptInstance = scriptInstance;
this.url = scriptInstance.url;
this.jsdURL = JSD_URL_SCHEME + "source?location=" + escape(this.url) +
this.jsdURL = JSD_URL_SCHEME + "source?location=" +
encodeURIComponent(this.url) +
"&instance=" + scriptInstance.sequence;
}
else
{
/* assume scriptInstance is a string containing the filename */
this.url = scriptInstance;
this.jsdURL = JSD_URL_SCHEME + "source?location=" + escape(this.url);
this.jsdURL = JSD_URL_SCHEME + "source?location=" +
encodeURIComponent(this.url);
}
this.shortName = abbreviateWord(getFileFromPath (this.url), 30);

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

@ -204,7 +204,7 @@ function vmgr_createwindow (windowId, cb)
}
var win = openDialog ("chrome://venkman/content/venkman-floater.xul?id=" +
escape(windowId), "_blank",
encodeURIComponent(windowId), "_blank",
"chrome,menubar,toolbar,resizable,dialog=no",
onWindowLoaded);
this.windows[windowId] = win;