Escapes a string according to RFC2426, section 5.
the string to escape
A newly allocated, escaped string.