[ARVADOS] updated: 1.3.0-1750-ga238ab719

Git user git at public.curoverse.com
Thu Oct 17 14:09:56 UTC 2019


Summary of changes:
 apps/workbench/app/assets/javascripts/ilike_filters.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

       via  a238ab71965d75c8d0610d40c0dd745856a8fd52 (commit)
      from  13ac0cadc7b65d2ab5ba3b3919dc55d06b85c3d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a238ab71965d75c8d0610d40c0dd745856a8fd52
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Oct 17 11:09:22 2019 -0300

    15429: Escapes the underscore char so it can be used as a literal.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/apps/workbench/app/assets/javascripts/ilike_filters.js b/apps/workbench/app/assets/javascripts/ilike_filters.js
index d2b549a53..4f5cd48e1 100644
--- a/apps/workbench/app/assets/javascripts/ilike_filters.js
+++ b/apps/workbench/app/assets/javascripts/ilike_filters.js
@@ -12,6 +12,7 @@
 // "foo"     => [["any", "ilike", "%foo%"]]
 // "foo.bar" => [["any", "ilike", "%foo.bar%"]]                         // "." is a word char in ilike queries
 // "foo/b-r" => [["any", "ilike", "%foo/b-r%"]]                         // "/" and "-", too
+// "foo_bar" => [["any", "ilike", "%foo\\_bar%"]                        // "_" should be escaped so it can be used as a literal
 // "foo bar" => [["any", "ilike", "%foo%"], ["any", "ilike", "%bar%"]]
 // "foo|bar" => [["any", "ilike", "%foo%"], ["any", "ilike", "%bar%"]]
 // " oo|bar" => [["any", "ilike", "%oo%"], ["any", "ilike", "%bar%"]]
@@ -19,7 +20,7 @@
 // " "       => []
 // null      => []
 window.ilike_filters = function(q) {
-    q = (q || '').replace(/[^-\w\.\/]+/g, ' ').trim()
+    q = (q || '').replace(/[^-\w\.\/]+/g, ' ').trim().replace(/_/g, '\\_')
     if (q == '')
         return []
     return q.split(" ").map(function(term) {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list