BugFix for #959 "StringIndexOutOfBoundsException with invalid Preview text"

Fixed #959 "StringIndexOutOfBoundsException with invalid Preview text". java.lang.StringIndexOutOfBoundsException handled: message dialogue shows with last five words before illegal backslash expression and trace is written in stderr.