def esc(s, esc_chars):
	if not s:
		return ""
	for c in esc_chars:
		esc_str = '\\' + c
		s = s.replace(c, esc_str)
	return s
Escape special characters
dataset/ETHPy150Open frappe/frappe/frappe/utils/__init__.py/esc