by Rob Sobers <rob@fogcreek.com>
Changes to one file · Browse files at 44f79da92e91 Showing diff from parent 1b1abf2a4644 2c1c3091ec4f Diff from another changeset...
@@ -140,10 +140,10 @@ var http_bookmarklet = "javascript:a=function (){ "
if (all_attributes.sDue != "None") {
if (all_attributes.sDue == -1) {
- due2 = "&sDueDate='+escape(goBug.dtDue.toDateString()) + '&sDueTime=' + CTZFromUTC(goBug.dtDue).getHours() + ':' + CTZFromUTC(goBug.dtDue).getMinutes() + '";
+due2 = "&sDueDate='+encodeURI(goBug.dtDue.toDateString()) + '&sDueTime=' + CTZFromUTC(goBug.dtDue).getHours() + ':' + CTZFromUTC(goBug.dtDue).getMinutes() + '";
} else {
due1 = "var cal = new Calendar(); var dtNow = new UTCDate(); var cMinutes = CTZFromUTC(dtNow).getMinutes(); var dtDue = cal.CTZguessDate('" + all_attributes.sDue + "');";
- due2 = "&sDueDate='+escape(dtDue.toDateString()) + '&sDueTime=' + CTZFromUTC(dtNow).getHours() + ':' + (cMinutes > 10 ? cMinutes : '0' + cMinutes) + '";
+due2 = "&sDueDate='+encodeURI(dtDue.toDateString()) + '&sDueTime=' + CTZFromUTC(dtNow).getHours() + ':' + (cMinutes > 10 ? cMinutes : '0' + cMinutes) + '";
}
}
http_bookmarklet = http_bookmarklet + due1 + " open(\'" + document.location.protocol + "//" + document.location.host + "/default.asp?command=new&pg=pgEditBug" + due2;
@@ -164,28 +164,28 @@ for (var xx = 0; xx < rgTextParams.length; xx++) {
this_param = rgTextParams[xx];
if (all_attributes[this_param] == same_as_current) {
- http_bookmarklet = http_bookmarklet + "&" + this_param + "=\'+escape(goBug." + this_param + ")+\'";
+http_bookmarklet = http_bookmarklet + "&" + this_param + "=\'+encodeURI(goBug." + this_param + ")+\'";
} else if (this_param === "") {
// do nothin
} else {
- http_bookmarklet = http_bookmarklet + "&" + this_param + "=" + escape(all_attributes[this_param]);
+http_bookmarklet = http_bookmarklet + "&" + this_param + "=" + encodeURI(all_attributes[this_param]);
}
}
if (all_attributes['sTags'] == same_as_current) {
- http_bookmarklet = http_bookmarklet + "&sTags=\'+escape(goBug.ListTagsAsArray())+\'";
+http_bookmarklet = http_bookmarklet + "&sTags=\'+encodeURI(goBug.ListTagsAsArray())+\'";
} else if (this_param === "") {
// do nothing
} else {
- http_bookmarklet = http_bookmarklet + "&sTags=" + escape(all_attributes['sTags']);
+http_bookmarklet = http_bookmarklet + "&sTags=" + encodeURI(all_attributes['sTags']);
}
// add the case relation and get the current selection
if ($('#temp-vs-bml').attr('checked') == true) {
- http_bookmarklet = http_bookmarklet + "&sEvent=See%20Case%20\' + goBug.ixBug + escape(\'\\r\\n\\r\\n\') + escape(document.getSelection()) + \'";
+http_bookmarklet = http_bookmarklet + "&sEvent=See%20Case%20\' + goBug.ixBug + encodeURI(\'\\r\\n\\r\\n\') + encodeURI(document.getSelection()) + \'";
} else {
- http_bookmarklet = http_bookmarklet + "&sEvent=' + (escape(document.getSelection()).length > 0 ? 'From%20' + escape(document.location.href) + escape(\'\\r\\n\\r\\n\') + escape(document.getSelection()): '') + \'";
+http_bookmarklet = http_bookmarklet + "&sEvent=' + (encodeURI(document.getSelection()).length > 0 ? 'From%20' + encodeURI(document.location.href) + encodeURI(\'\\r\\n\\r\\n\') + encodeURI(document.getSelection()): '') + \'";
}
http_bookmarklet = http_bookmarklet + "&b=c\'); return;};a();";
|
Loading...