@core_helper
def escape_js(str_to_escape):
 return str_to_escape.replace('\\', '\\\\').replace("'", "\\'").replace('"', '\\"')

@ core_helper def escape_js ( str_to_escape ) : return str_to_escape . replace ( '\\' , '\\\\' ) . replace ( "'" , "\\'" ) . replace ( '"' , '\\"' )
escapes special characters from a js string .