From f002d9cfb2ad66e632f7aba0ab5b7339e1ce33b1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 23 Apr 2014 17:44:20 +0100 Subject: [PATCH] New implementation of pp2limit method based on visitFields. --- src/mkws-filter.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 4d600cc..03e07e1 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -95,7 +95,13 @@ function filterSet(team) { }; that.NEW_pp2limit = function(initial) { - return that.OLD_pp2limit(initial); + var res = initial || ""; + + that.visitFields(function(field, value) { + if (res) res += ","; + res += field + "=" + value.replace(/[\\|,]/g, '\\$&'); + }); + return res; } return that; -- 1.7.10.4