FogBugz » CaseTemplatesJS
Clone URL:  
Pushed to 2 repositories · View In Graph Contained in tip

merge

Changeset 44f79da92e91

Parents 1b1abf2a4644

Parents 2c1c3091ec4f

by Profile picture of User 464Rob Sobers <rob@fogcreek.com>

Changes to one file · Browse files at 44f79da92e91 Showing diff from parent 1b1abf2a4644 2c1c3091ec4f Diff from another changeset...

Change 1 of 2 Show Entire File bookmarklets.js Stacked
 
140
141
142
143
 
144
145
146
 
147
148
149
 
164
165
166
167
 
168
169
170
171
 
172
173
174
175
176
177
 
178
179
180
181
 
182
183
184
185
186
 
187
188
 
189
190
191
 
140
141
142
 
143
144
145
 
146
147
148
149
 
164
165
166
 
167
168
169
170
 
171
172
173
174
175
176
 
177
178
179
180
 
181
182
183
184
185
 
186
187
 
188
189
190
191
@@ -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();";