+def escape_strings(token_list, dbname):
+ """Escape strings"""
+ for token in token_list.flatten():
+ if token.ttype is T.String.Single:
+ value = token.value[1:-1] # unquote by removing apostrophes
+ value = sqlrepr(value, dbname)
+ token.normalized = token.value = value
+
+