Commit 8c054c6c authored by Stefane Fermigier's avatar Stefane Fermigier

Remove unneeded escapes.

parent 182453fb
...@@ -86,17 +86,17 @@ ...@@ -86,17 +86,17 @@
// XXX these regexps fail to detect many invalid dates. // XXX these regexps fail to detect many invalid dates.
if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+\-][0-2]\d:[0-5]\d|Z)/) if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d/)) { || str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d/)) {
// ISO, milliseconds // ISO, milliseconds
this.mom = moment(str); this.mom = moment(str);
this.setPrecision(MSEC); this.setPrecision(MSEC);
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/) } else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)) { || str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)) {
// ISO, seconds // ISO, seconds
this.mom = moment(str); this.mom = moment(str);
this.setPrecision(SEC); this.setPrecision(SEC);
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/) } else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/)) { || str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/)) {
// ISO, minutes // ISO, minutes
this.mom = moment(str); this.mom = moment(str);
......
...@@ -1075,10 +1075,10 @@ ...@@ -1075,10 +1075,10 @@
// browsing every entry // browsing every entry
// is part of the user space // is part of the user space
if (/^[^\/]+\/[^\/]+$/.test(i)) { if (/^[^/]+\/[^/]+$/.test(i)) {
// this is an attachment // this is an attachment
attachmentFound(param, i); attachmentFound(param, i);
} else if (/^[^\/]+$/.test(i)) { } else if (/^[^/]+$/.test(i)) {
// this is a document // this is a document
param._id = i; param._id = i;
result = repairOne(param, repair); result = repairOne(param, repair);
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
// allow tests to check them // allow tests to check them
param.headers = Object.assign({}, param.headers); param.headers = Object.assign({}, param.headers);
} }
param.headers["Content-Type"] = "multipart\/form-data; boundary=" + param.headers["Content-Type"] = "multipart/form-data; boundary=" +
param.data.boundary; param.data.boundary;
param.data.body += '--' + param.data.boundary + '--\r\n'; param.data.body += '--' + param.data.boundary + '--\r\n';
param.data = param.data.body; param.data = param.data.body;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"use strict"; "use strict";
var query_class_dict = {}, var query_class_dict = {},
regexp_escape = /[\-\[\]{}()*+?.,\\\^$|#\s]/g, regexp_escape = /[-[\]{}()*+?.,\\^$|#\s]/g,
regexp_percent = /%/g, regexp_percent = /%/g,
regexp_underscore = /_/g, regexp_underscore = /_/g,
regexp_operator = /^(?:AND|OR|NOT)$/i, regexp_operator = /^(?:AND|OR|NOT)$/i,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment