From 9b79b35a9ae1430c28ccf5def1f67056b24a4f03 Mon Sep 17 00:00:00 2001
From: Damien Sorel
Date: Thu, 5 Mar 2020 12:33:29 +0100
Subject: [PATCH 01/24] Hungarian translation (#862)
---
src/i18n/hu.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/hu.json | 3 ++
src/plugins/not-group/i18n/hu.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/hu.json
create mode 100644 src/plugins/invert/i18n/hu.json
create mode 100644 src/plugins/not-group/i18n/hu.json
diff --git a/src/i18n/hu.json b/src/i18n/hu.json
new file mode 100644
index 00000000..22fa5e4c
--- /dev/null
+++ b/src/i18n/hu.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Hungarian - Magyar (hu)",
+ "__author": "Szabó Attila \"Tailor993\", https://www.tailor993.hu",
+
+ "add_rule": "Feltétel hozzáadása",
+ "add_group": "Csoport hozzáadása",
+ "delete_rule": "Feltétel törlése",
+ "delete_group": "Csoport törlése",
+
+ "conditions": {
+ "AND": "ÉS",
+ "OR": "VAGY"
+ },
+
+ "operators": {
+ "equal": "egyenlő",
+ "not_equal": "nem egyenlő",
+ "in": "bennevan",
+ "not_in": "nincs benne",
+ "less": "kisebb",
+ "less_or_equal": "kisebb vagy egyenlő",
+ "greater": "nagyobb",
+ "greater_or_equal": "nagyobb vagy egyenlő",
+ "between": "közötte",
+ "not_between": "nincs közötte",
+ "begins_with": "ezzel kezdődik",
+ "not_begins_with": "ezzel nem kezdődik",
+ "contains": "tartalmazza",
+ "not_contains": "nem tartalmazza",
+ "ends_with": "erre végződik",
+ "not_ends_with": "errre nem végződik",
+ "is_empty": "üres",
+ "is_not_empty": "nem üres",
+ "is_null": "null",
+ "is_not_null": "nem null"
+ },
+
+ "errors": {
+ "no_filter": "Nincs kiválasztott feltétel",
+ "empty_group": "A csoport üres",
+ "radio_empty": "Nincs kiválasztott érték",
+ "checkbox_empty": "Nincs kiválasztott érték",
+ "select_empty": "Nincs kiválasztott érték",
+ "string_empty": "Üres érték",
+ "string_exceed_min_length": "A megadott szöveg rövidebb a várt {0} karakternél",
+ "string_exceed_max_length": "A megadott szöveg nem tartalmazhat többet, mint {0} karaktert",
+ "string_invalid_format": "Nem megfelelő formátum ({0})",
+ "number_nan": "Nem szám",
+ "number_not_integer": "Nem egész szám (integer)",
+ "number_not_double": "Nem valós szám",
+ "number_exceed_min": "Nagyobbnak kell lennie, mint {0}",
+ "number_exceed_max": "Kisebbnek kell lennie, mint {0}",
+ "number_wrong_step": "{0} többszörösének kell lennie.",
+ "number_between_invalid": "INem megfelelő érték, {0} nagyobb, mint {1}",
+ "datetime_empty": "Üres érték",
+ "datetime_invalid": "nem megfelelő dátum formátum ({0})",
+ "datetime_exceed_min": "A dátumnak későbbinek kell lennie, mint{0}",
+ "datetime_exceed_max": "A dátumnak korábbinak kell lennie, mint {0}",
+ "datetime_between_invalid": "Nem megfelelő értékek, {0} nagyobb, mint {1}",
+ "boolean_not_valid": "Nem igaz/hamis (boolean)",
+ "operator_not_multiple": "Ez a művelet: \"{1}\" nem fogadhat el több értéket"
+ }
+}
diff --git a/src/plugins/invert/i18n/hu.json b/src/plugins/invert/i18n/hu.json
new file mode 100644
index 00000000..83b08887
--- /dev/null
+++ b/src/plugins/invert/i18n/hu.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Megfordítás (Invertálás)"
+}
diff --git a/src/plugins/not-group/i18n/hu.json b/src/plugins/not-group/i18n/hu.json
new file mode 100644
index 00000000..4399728c
--- /dev/null
+++ b/src/plugins/not-group/i18n/hu.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NEM"
+}
From cc03c3336c2a6aaa60ca9a83af506232d4f034b2 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Thu, 19 Mar 2020 10:57:03 +0100
Subject: [PATCH 02/24] Swedish translations (#865)
---
src/i18n/sv.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/sv.json | 3 ++
src/plugins/not-group/i18n/sv.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/sv.json
create mode 100644 src/plugins/invert/i18n/sv.json
create mode 100644 src/plugins/not-group/i18n/sv.json
diff --git a/src/i18n/sv.json b/src/i18n/sv.json
new file mode 100644
index 00000000..a3b06e84
--- /dev/null
+++ b/src/i18n/sv.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Svenska (sv)",
+ "__author": "hekin1",
+
+ "add_rule": "Lägg till regel",
+ "add_group": "Lägg till grupp",
+ "delete_rule": "Ta bort",
+ "delete_group": "Ta bort",
+
+ "conditions": {
+ "AND": "OCH",
+ "OR": "ELLER"
+ },
+
+ "operators": {
+ "equal": "lika med",
+ "not_equal": "ej lika med",
+ "in": "en av",
+ "not_in": "ej en av",
+ "less": "mindre",
+ "less_or_equal": "mindre eller lika med",
+ "greater": "större",
+ "greater_or_equal": "större eller lika med",
+ "between": "mellan",
+ "not_between": "ej mellan",
+ "begins_with": "börjar med",
+ "not_begins_with": "börjar inte med",
+ "contains": "innehåller",
+ "not_contains": "innehåller inte",
+ "ends_with": "slutar med",
+ "not_ends_with": "slutar inte med",
+ "is_empty": "är tom",
+ "is_not_empty": "är inte tom",
+ "is_null": "är null",
+ "is_not_null": "är inte null"
+ },
+
+ "errors": {
+ "no_filter": "Inget filter valt",
+ "empty_group": "Gruppen är tom",
+ "radio_empty": "Inget värde valt",
+ "checkbox_empty": "Inget värde valt",
+ "select_empty": "Inget värde valt",
+ "string_empty": "Tomt värde",
+ "string_exceed_min_length": "Måste innehålla minst {0} tecken",
+ "string_exceed_max_length": "Får ej innehålla fler än {0} tecken",
+ "string_invalid_format": "Felaktigt format ({0})",
+ "number_nan": "Inte numeriskt",
+ "number_not_integer": "Inte en siffra",
+ "number_not_double": "Inte ett decimaltal",
+ "number_exceed_min": "Måste vara större än {0}",
+ "number_exceed_max": "Måste vara lägre än {0}",
+ "number_wrong_step": "Måste vara en mutipel av {0}",
+ "number_between_invalid": "Felaktiga värden, {0} är större än {1}",
+ "datetime_empty": "Tomt värde",
+ "datetime_invalid": "Felaktigt datumformat ({0})",
+ "datetime_exceed_min": "Måste vara efter {0}",
+ "datetime_exceed_max": "Måste vara före {0}",
+ "datetime_between_invalid": "Felaktiga värden, {0} är större än {1}",
+ "boolean_not_valid": "Inte en boolean",
+ "operator_not_multiple": "Operatorn \"{1}\" accepterar inte flera värden"
+ }
+}
diff --git a/src/plugins/invert/i18n/sv.json b/src/plugins/invert/i18n/sv.json
new file mode 100644
index 00000000..aa932882
--- /dev/null
+++ b/src/plugins/invert/i18n/sv.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Invertera"
+}
diff --git a/src/plugins/not-group/i18n/sv.json b/src/plugins/not-group/i18n/sv.json
new file mode 100644
index 00000000..2778b4da
--- /dev/null
+++ b/src/plugins/not-group/i18n/sv.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "INTE"
+}
From e4c845c1ecd270d5a216fac6912f792266c9cecc Mon Sep 17 00:00:00 2001
From: Damien Sorel
Date: Fri, 4 Sep 2020 12:16:10 +0200
Subject: [PATCH 03/24] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 3f5fea48..262fd046 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@
[](https://github.com/mistic100/jQuery-QueryBuilder/actions)
[](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
[](https://david-dm.org/mistic100/jQuery-QueryBuilder)
+[](https://gitlocalize.com/repo/5259/whole_project?utm_source=badge)
jQuery plugin offering an simple interface to create complex queries.
From 1539a6ce5de8eee7109f9a8c05208b83354e1faa Mon Sep 17 00:00:00 2001
From: mistic100
Date: Mon, 2 Nov 2020 21:06:20 +0100
Subject: [PATCH 04/24] Better dependencies, remove bower and composer
---
.gitignore | 2 ++
bower.json | 46 ----------------------------------------------
composer.json | 46 ----------------------------------------------
package.json | 12 ++++++------
4 files changed, 8 insertions(+), 98 deletions(-)
delete mode 100644 bower.json
delete mode 100644 composer.json
diff --git a/.gitignore b/.gitignore
index 2b7141a4..d0a0ebb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@ doc
.coverage-results
.idea
*.iml
+yarn.lock
+package-lock.json
diff --git a/bower.json b/bower.json
deleted file mode 100644
index f1850a1e..00000000
--- a/bower.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "jQuery-QueryBuilder",
- "authors": [
- {
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "homepage": "https://www.strangeplanet.fr"
- }
- ],
- "description": "jQuery plugin for user friendly query/filter creator",
- "main": [
- "dist/js/query-builder.js",
- "dist/css/query-builder.default.css"
- ],
- "dependencies": {
- "jquery": ">=1.10.0",
- "bootstrap": ">=3.1.0 <4",
- "moment": ">=2.6.0",
- "jquery-extendext": ">=0.1.2",
- "doT": ">=1.0.3"
- },
- "keywords": [
- "jquery",
- "query",
- "builder",
- "filter"
- ],
- "license": "MIT",
- "homepage": "https://querybuilder.js.org",
- "repository": {
- "type": "git",
- "url": "git://github.com/mistic100/jQuery-QueryBuilder.git"
- },
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "build",
- "src",
- "tests",
- "composer.json",
- "package.json",
- "Gruntfile.js",
- "CONTRIBUTING.md"
- ]
-}
diff --git a/composer.json b/composer.json
deleted file mode 100644
index 3d52b425..00000000
--- a/composer.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "mistic100/jquery-querybuilder",
- "version": "2.4.0",
- "authors": [{
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "homepage": "https://www.strangeplanet.fr"
- }],
- "description": "jQuery plugin for user friendly query/filter creator",
- "require": {
- "robloach/component-installer": "*",
- "components/jquery": ">=1.10.0",
- "moment/moment": ">=2.6.0",
- "components/bootstrap": ">=3.1.0 <4"
- },
- "keywords": [
- "jquery",
- "query",
- "builder",
- "filter"
- ],
- "license": "MIT",
- "homepage": "https://querybuilder.js.org",
- "support": {
- "issues": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
- },
- "extra": {
- "component": {
- "styles": [
- "dist/css/query-builder.default.css"
- ],
- "scripts": [
- "dist/js/query-builder.standalone.js"
- ],
- "files": [
- "dist/css/query-builder.default.min.css",
- "dist/css/query-builder.dark.css",
- "dist/css/query-builder.dark.min.css",
- "dist/js/query-builder.js",
- "dist/js/query-builder.min.js",
- "dist/js/query-builder.standalone.min.js",
- "dist/i18n/*.js"
- ]
- }
- }
-}
diff --git a/package.json b/package.json
index 6b650b9d..14a80bfd 100644
--- a/package.json
+++ b/package.json
@@ -9,11 +9,12 @@
"description": "jQuery plugin for user friendly query/filter creator",
"main": "dist/js/query-builder.js",
"dependencies": {
- "bootstrap": ">=3.1.0 <4",
- "dot": ">=1.0.3",
- "jquery": "^3.3.1",
- "jquery-extendext": ">=0.1.2",
- "moment": "^2.21.0"
+ "bootstrap": "^3.4.1",
+ "dot": "^1.1.3",
+ "jquery": "^3.5.1",
+ "jquery-extendext": "^1.0.0",
+ "moment": "^2.29.1",
+ "sql-parser-mistic": "^1.2.3"
},
"devDependencies": {
"awesome-bootstrap-checkbox": "^0.3.7",
@@ -51,7 +52,6 @@
"jit-grunt": "^0.10.0",
"qunit": "^2.5.1",
"selectize": "^0.12.4",
- "sql-parser-mistic": "^1.2.2",
"time-grunt": "^1.3.0"
},
"keywords": [
From 7027a020bbd41fb925dde7d6e25a3b427dbdde9e Mon Sep 17 00:00:00 2001
From: Ninezero <41019113+ninezero90hy@users.noreply.github.com>
Date: Tue, 3 Nov 2020 05:07:02 +0900
Subject: [PATCH 05/24] Modify the library load information being used in the
example (#893)
---
examples/index.html | 2 +-
tests/index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/index.html b/examples/index.html
index e6fc840f..8fc91c18 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -114,7 +114,7 @@ Output
-
+
diff --git a/tests/index.html b/tests/index.html
index c1e719e0..463bc9eb 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -26,7 +26,7 @@
-
+
From a5950dda1c90042aafba5f886d9cf12bc9763fbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Strau=C3=9F?=
Date: Wed, 10 Jun 2020 10:33:06 +0200
Subject: [PATCH 06/24] Fixed Unexpected 'NUMBER'
if you had a query with an "IN" with 10 elements or more, the regex of setRulesFromSQL did not match correctly
---
src/plugins/sql-support/plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/sql-support/plugin.js b/src/plugins/sql-support/plugin.js
index 95b7eda5..17f5c506 100644
--- a/src/plugins/sql-support/plugin.js
+++ b/src/plugins/sql-support/plugin.js
@@ -214,7 +214,7 @@ QueryBuilder.defaults({
'named': function(values, char) {
if (!char || char.length > 1) char = ':';
var regex1 = new RegExp('^\\' + char);
- var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')', 'g');
+ var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')\\b', 'g');
return {
parse: function(v) {
return regex1.test(v) ? values[v.slice(1)] : v;
From 5a94400d35f497643dcf1f89cecf2da97c852120 Mon Sep 17 00:00:00 2001
From: Robin van der Vliet
Date: Fri, 19 Mar 2021 17:07:25 +0100
Subject: [PATCH 07/24] Esperanto translation (#906)
---
src/i18n/eo.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/eo.json | 3 ++
src/plugins/not-group/i18n/eo.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/eo.json
create mode 100644 src/plugins/invert/i18n/eo.json
create mode 100644 src/plugins/not-group/i18n/eo.json
diff --git a/src/i18n/eo.json b/src/i18n/eo.json
new file mode 100644
index 00000000..b3c9166d
--- /dev/null
+++ b/src/i18n/eo.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Esperanto (eo)",
+ "__author": "Robin van der Vliet, https://robinvandervliet.com/",
+
+ "add_rule": "Aldoni regulon",
+ "add_group": "Aldoni grupon",
+ "delete_rule": "Forigi",
+ "delete_group": "Forigi",
+
+ "conditions": {
+ "AND": "KAJ",
+ "OR": "AŬ"
+ },
+
+ "operators": {
+ "equal": "estas egala al",
+ "not_equal": "ne estas egala al",
+ "in": "estas en",
+ "not_in": "ne estas en",
+ "less": "estas malpli ol",
+ "less_or_equal": "estas malpli ol aŭ egala al",
+ "greater": "estas pli ol",
+ "greater_or_equal": "estas pli ol aŭ egala al",
+ "between": "estas inter",
+ "not_between": "ne estas inter",
+ "begins_with": "komenciĝas per",
+ "not_begins_with": "ne komenciĝas per",
+ "contains": "enhavas",
+ "not_contains": "ne enhavas",
+ "ends_with": "finiĝas per",
+ "not_ends_with": "ne finiĝas per",
+ "is_empty": "estas malplena",
+ "is_not_empty": "ne estas malplena",
+ "is_null": "estas senvalora",
+ "is_not_null": "ne estas senvalora"
+ },
+
+ "errors": {
+ "no_filter": "Neniu filtrilo elektita",
+ "empty_group": "La grupo estas malplena",
+ "radio_empty": "Neniu valoro elektita",
+ "checkbox_empty": "Neniu valoro elektita",
+ "select_empty": "Neniu valoro elektita",
+ "string_empty": "Malplena valoro",
+ "string_exceed_min_length": "Devas enhavi pli ol {0} signojn",
+ "string_exceed_max_length": "Devas ne enhavi pli ol {0} signojn",
+ "string_invalid_format": "Nevalida strukturo ({0})",
+ "number_nan": "Ne estas nombro",
+ "number_not_integer": "Ne estas entjera nombro",
+ "number_not_double": "Ne estas reela nombro",
+ "number_exceed_min": "Devas esti pli ol {0}",
+ "number_exceed_max": "Devas esti malpli ol {0}",
+ "number_wrong_step": "Devas esti oblo de {0}",
+ "number_between_invalid": "Nevalidaj valoroj, {0} estas pli ol {1}",
+ "datetime_empty": "Malplena valoro",
+ "datetime_invalid": "Nevalida dato ({0})",
+ "datetime_exceed_min": "Devas esti post {0}",
+ "datetime_exceed_max": "Devas esti antaŭ {0}",
+ "datetime_between_invalid": "Nevalidaj valoroj, {0} estas post {1}",
+ "boolean_not_valid": "Ne estas bulea valoro",
+ "operator_not_multiple": "La operacio \"{1}\" ne akceptas plurajn valorojn"
+ }
+}
diff --git a/src/plugins/invert/i18n/eo.json b/src/plugins/invert/i18n/eo.json
new file mode 100644
index 00000000..e5ddde54
--- /dev/null
+++ b/src/plugins/invert/i18n/eo.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Inversigi"
+}
diff --git a/src/plugins/not-group/i18n/eo.json b/src/plugins/not-group/i18n/eo.json
new file mode 100644
index 00000000..8025e4e8
--- /dev/null
+++ b/src/plugins/not-group/i18n/eo.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NE"
+}
From f620fbd06cd620e8b48f8f28bf7c6657a72e268b Mon Sep 17 00:00:00 2001
From: mistic100
Date: Sat, 20 Mar 2021 14:36:53 +0100
Subject: [PATCH 08/24] Fix #905 Potential XSS on template generation
---
src/core.js | 10 +++++-----
src/plugins/bt-tooltip-errors/plugin.js | 2 +-
src/plugins/filter-description/plugin.js | 6 +++---
src/plugins/invert/plugin.js | 4 ++--
src/plugins/not-group/plugin.js | 2 +-
src/plugins/sortable/plugin.js | 6 +++---
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/core.js b/src/core.js
index 305a9e53..6944c9a3 100644
--- a/src/core.js
+++ b/src/core.js
@@ -345,7 +345,7 @@ QueryBuilder.prototype.setRoot = function(addRule, data, flags) {
addRule = (addRule === undefined || addRule === true);
var group_id = this.nextGroupId();
- var $group = $(this.getGroupTemplate(group_id, 1));
+ var $group = $($.parseHTML(this.getGroupTemplate(group_id, 1)));
this.$el.append($group);
this.model.root = new Group(null, $group);
@@ -535,7 +535,7 @@ QueryBuilder.prototype.addRule = function(parent, data, flags) {
}
var rule_id = this.nextRuleId();
- var $rule = $(this.getRuleTemplate(rule_id));
+ var $rule = $($.parseHTML(this.getRuleTemplate(rule_id)));
var model = parent.addRule($rule);
model.data = data;
@@ -625,7 +625,7 @@ QueryBuilder.prototype.createRuleFilters = function(rule) {
* @returns {QueryBuilder.Filter[]}
*/
var filters = this.change('getRuleFilters', this.filters, rule);
- var $filterSelect = $(this.getRuleFilterSelect(rule, filters));
+ var $filterSelect = $($.parseHTML(this.getRuleFilterSelect(rule, filters)));
rule.$el.find(QueryBuilder.selectors.filter_container).html($filterSelect);
@@ -654,7 +654,7 @@ QueryBuilder.prototype.createRuleOperators = function(rule) {
}
var operators = this.getOperators(rule.filter);
- var $operatorSelect = $(this.getRuleOperatorSelect(rule, operators));
+ var $operatorSelect = $($.parseHTML(this.getRuleOperatorSelect(rule, operators)));
$operatorContainer.html($operatorSelect);
@@ -700,7 +700,7 @@ QueryBuilder.prototype.createRuleInput = function(rule) {
var filter = rule.filter;
for (var i = 0; i < rule.operator.nb_inputs; i++) {
- var $ruleInput = $(this.getRuleInput(rule, i));
+ var $ruleInput = $($.parseHTML(this.getRuleInput(rule, i)));
if (i > 0) $valueContainer.append(this.settings.inputs_separator);
$valueContainer.append($ruleInput);
$inputs = $inputs.add($ruleInput);
diff --git a/src/plugins/bt-tooltip-errors/plugin.js b/src/plugins/bt-tooltip-errors/plugin.js
index e9bc935c..68423252 100644
--- a/src/plugins/bt-tooltip-errors/plugin.js
+++ b/src/plugins/bt-tooltip-errors/plugin.js
@@ -15,7 +15,7 @@ QueryBuilder.define('bt-tooltip-errors', function(options) {
// add BT Tooltip data
this.on('getRuleTemplate.filter getGroupTemplate.filter', function(h) {
- var $h = $(h.value);
+ var $h = $($.parseHTML(h.value));
$h.find(QueryBuilder.selectors.error_container).attr('data-toggle', 'tooltip');
h.value = $h.prop('outerHTML');
});
diff --git a/src/plugins/filter-description/plugin.js b/src/plugins/filter-description/plugin.js
index bbe58fcb..472dd328 100644
--- a/src/plugins/filter-description/plugin.js
+++ b/src/plugins/filter-description/plugin.js
@@ -19,7 +19,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($p.length === 0) {
- $p = $('');
+ $p = $($.parseHTML(''));
$p.appendTo(rule.$el);
}
else {
@@ -49,7 +49,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($b.length === 0) {
- $b = $('');
+ $b = $($.parseHTML(''));
$b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
$b.popover({
@@ -89,7 +89,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($b.length === 0) {
- $b = $('');
+ $b = $($.parseHTML(''));
$b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
$b.on('click', function() {
diff --git a/src/plugins/invert/plugin.js b/src/plugins/invert/plugin.js
index 6b77e2fd..c0294e84 100644
--- a/src/plugins/invert/plugin.js
+++ b/src/plugins/invert/plugin.js
@@ -31,7 +31,7 @@ QueryBuilder.define('invert', function(options) {
// Modify templates
if (!options.disable_template) {
this.on('getGroupTemplate.filter', function(h) {
- var $h = $(h.value);
+ var $h = $($.parseHTML(h.value));
$h.find(Selectors.condition_container).after(
'