Search with single quote

We have a problem with select2. We use it to search for the name of a company (with postgresql) before creating a new one, everything works perfectly but when I search for a name with a single quote (’) I get the message “The results could not be loaded”. If we use apostrophe it works fine, but we have records created with single quote, so this is a problem.

Thank you and best regards.