summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-21 16:25:16 +0100
committerYorhel <git@yorhel.nl>2010-11-21 16:25:16 +0100
commitdb700ac32533b611242a36e2dac772d8632af4ed (patch)
tree321e6d19fe1695dde755f65085bc924c61441a24 /data
parenta79312bb341bdfbdf14e7aeb3d1ffa6548604960 (diff)
Use ~ as value separator in the filter string, rather than a comma
It seems a comma has to be escaped in query string values. A ~ doesn't and thus makes the URIs significantly shorter.
Diffstat (limited to 'data')
-rw-r--r--data/script.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/script.js b/data/script.js
index d54b8186..f4965ebb 100644
--- a/data/script.js
+++ b/data/script.js
@@ -1784,7 +1784,7 @@ if(byId('prodrelations'))
* <fieldwritefunc> function reference, argument: <fieldcontents>, data from filter format; must update the contents with the passed data
*
* Filter string format:
- * <field>-<value1>,<value2>.<field2>-<value>.<field3>-<value1>,<value2>
+ * <field>-<value1>~<value2>.<field2>-<value>.<field3>-<value1>~<value2>
* Where:
* <field> = [a-z0-9]+
* <value> = [a-zA-Z0-9_]+ and any UTF-8 characters not in the ASCII range
@@ -1900,7 +1900,7 @@ function filSerialize() {
}
}
if(r.length > 0 && r[0] != '')
- l.push(fil_cats[0][f].fil_code+'-'+r.join(','));
+ l.push(fil_cats[0][f].fil_code+'-'+r.join('~'));
}
byId('fil').value = l.join('.');
var cnt = byName(byId('filselect'), 'i')[1];
@@ -1922,7 +1922,7 @@ function filDeSerialize() {
for(var fn in f) {
var c = byId('fil_check_'+fn);
c.checked = f[fn] == '' ? false : true;
- var v = f[fn].split(',');
+ var v = f[fn].split('~');
for(var i=0; i<v.length; i++)
v[i] = v[i].replace(/_([0-9]{2})/g, function (a, e) { return fil_escape[e] });
fil_cats[0][fn].fil_writefunc(fil_cats[0][fn].fil_contents, v);