14322: Tweak JSON_KEEP_LOCATOR_REGEXP and comment
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index 8c80a646ee58655a329c7efe1e9ee9164c61fbe1..4c4b5ff34df52c471fa2ceaf566e8f9a5b606d02 100644 (file)
@@ -678,8 +678,8 @@ module ApplicationHelper
     render_runtime duration, use_words, round_to_min
   end
 
-  # Keep locators are expected to be of the form \"...<pdh/file_path>\"
-  JSON_KEEP_LOCATOR_REGEXP = /([0-9a-f]{32}\+\d+[^'"]*?|[a-z0-9]{5}-4zz18-[a-z0-9]{15})(?=['"]|\z|$)/
+  # Keep locators are expected to be of the form \"...<pdh/file_path>\" or \"...<uuid/file_path>\"
+  JSON_KEEP_LOCATOR_REGEXP = /([0-9a-f]{32}\+\d+[^'"]*|[a-z0-9]{5}-4zz18-[a-z0-9]{15}[^'"]*)(?=['"]|\z|$)/
   def keep_locator_in_json str
     # Return a list of all matches
     str.scan(JSON_KEEP_LOCATOR_REGEXP).flatten