fixes #4728 need to escape inner quotes in Show Query

Fixed the issue and pushed the change for review, please check it.