From Sergey: Fix for special symbol \' or &apos; not being treated correctly.