Fix error regarding unescape_string introduced by #8838

@tkelman I have fixed the issue mentioned in #9137.