def escape_quotes(self, val):
if self.is_string(val) and self._in_quotes(val, self.quote):<EOL><INDENT>middle = self.remove_quotes(val).replace("<STR_LIT:\\>" + self.quote, self.quote)<EOL>middle = middle.replace(self.quote, "<STR_LIT:\\>" + self.quote)<EOL>val = self.add_quotes(middle)<EOL><DEDENT>return val<EOL>
Escape any quotes in a value