mirror of
https://github.com/grocy/grocy.git
synced 2025-08-21 12:52:39 +00:00
Escape DataTable regex searches (fixes #2654)
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
|
||||
### New Feature: xxxx
|
||||
|
||||
- Fixed that the built-in Open Food Facts external barcode lookup plugin used the staging environment of the Open Food Facts API instead of the production one
|
||||
- xxx
|
||||
|
||||
### Stock
|
||||
|
||||
- xxx
|
||||
- Fixed that the built-in Open Food Facts external barcode lookup plugin used the staging environment of the Open Food Facts API instead of the production one
|
||||
- Fixed that the product group filter on the products page (master data) didn't work when the selected product group contained special characters
|
||||
- Fixed that the product filter on the stock journal summary page didn't work when the selected product contained special characters
|
||||
|
||||
### Shopping list
|
||||
|
||||
|
@@ -32,7 +32,7 @@ $("#product-group-filter").on("change", function()
|
||||
}
|
||||
else
|
||||
{
|
||||
productsTable.column(productsTable.colReorder.transpose(6)).search("^" + value + "$", true, false).draw();
|
||||
productsTable.column(productsTable.colReorder.transpose(6)).search("^" + $.fn.dataTable.util.escapeRegex(value) + "$", true, false).draw();
|
||||
}
|
||||
|
||||
});
|
||||
|
@@ -18,7 +18,7 @@ $("#product-filter").on("change", function()
|
||||
}
|
||||
else
|
||||
{
|
||||
journalSummaryTable.column(journalSummaryTable.colReorder.transpose(1)).search("^" + text + "$", true, false).draw();
|
||||
journalSummaryTable.column(journalSummaryTable.colReorder.transpose(1)).search("^" + $.fn.dataTable.util.escapeRegex(text) + "$", true, false).draw();
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user