mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Grid framework fixes, including extension of sanitize_text to work with lists of text.
This commit is contained in:
@@ -196,7 +196,18 @@ def restore_text(text):
|
||||
return text
|
||||
|
||||
def sanitize_text(text):
|
||||
"""Restricts the characters that are allowed in a text"""
|
||||
"""
|
||||
Restricts the characters that are allowed in text; accepts both strings
|
||||
and lists of strings.
|
||||
"""
|
||||
if isinstance( text, basestring ):
|
||||
return _sanitize_text_helper(text)
|
||||
elif isinstance( text, list ):
|
||||
return [ _sanitize_text_helper(t) for t in text ]
|
||||
|
||||
def _sanitize_text_helper(text):
|
||||
"""Restricts the characters that are allowed in a string"""
|
||||
|
||||
out = []
|
||||
for c in text:
|
||||
if c in valid_chars:
|
||||
|
||||
@@ -48,7 +48,7 @@ var Grid = Backbone.Model.extend({
|
||||
// Update URL arg with new condition.
|
||||
if (append) {
|
||||
// Update or append value.
|
||||
var cur_val = this.attributes.key,
|
||||
var cur_val = this.attributes.filters[key],
|
||||
new_val;
|
||||
if (cur_val === null || cur_val === undefined) {
|
||||
new_val = value;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user