Improved handling of special characters in note