This function takes a string and escapes all characters used as control characters by the RTF document format, i.e. the characters '{', '}' and ''.
The escaped string.