code: def _filter_string(value):
          
          if value is None:
              value = ""
  
          # replace whitespace with space
          value = value.replace("\n", " ")
          value = value.replace("\t", " ")
  
          # CSV seperator
          value = value.replace("|", " ")
  
          # remove leading/trailing whitespace
          value = value.strip()
  
          # hack because MAM doesn't quote sql correctly
          value = value.replace("\\", "")
  
          # Used for stripping non-ascii characters
          value = ''.join(c for c in value if 31 < ord(c) < 127)
  
          return value
docs: Filter the string so MAM doesn't have heart failure.