I need to escape all special character and then add back slash () into input parameters using python. I have done something but it's not working. My code is below.
rname = request.POST.get('rname')
ename = re.escape(rname)
add_slash = ename + '\'
Here I need to escape all special character first and then add the \ with that string.