This function takes a string and escapes characters that are considered wildcards in a LIKE-operation, or more specifically all the characters in the following string "[%_".
There is no need to escape the characters "]-^" since they have a wildcard-function only when used in combination with unescaped opening brackets.
The escaped string.